diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index eac828c..f2b7150 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -19,7 +19,7 @@ - + @@ -34,6 +34,12 @@ + + + + + + @@ -51,9 +57,11 @@ import ListH2sConfig from './components/listH2sConfig' import ListWellcoverConfig from '@/views/deviceConfig/components/listWellCoverConfig' import ListWellliquidConfig from '@/views/deviceConfig/components/listWellLiquidConfig' +import ListCombustibleGasConfig from '@/views/deviceConfig/components/ListCombustibleGasConfig' +import ListPressConfig from '@/views/deviceConfig/components/ListPressConfig' export default { name: 'DeviceConfig', - components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig }, + components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig, ListCombustibleGasConfig, ListPressConfig }, data() { return { activeName: 'liquid' @@ -86,6 +94,10 @@ this.$refs.h2sConfig.fetchData() } else if (tab.name === 'wellliquid') { this.$refs.wellliquidConfig.fetchData() + } else if (tab.name === 'combustibleGas') { + this.$refs.combustibleGasConfig.fetchData() + } else if (tab.name === 'press') { + this.$refs.pressConfig.fetchData() } }, // 计算那个是当前第一个tab @@ -112,6 +124,10 @@ this.activeName = 'h2s' } else if (hasPermission('/busConfig/wellliquidConfig/list')) { this.activeName = 'wellliquid' + } else if (hasPermission('/busConfig/combustibleGasConfig/list')) { + this.activeName = 'combustibleGas' + } else if (hasPermission('/busConfig/pressConfig/list')) { + this.activeName = 'press' } } } diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index eac828c..f2b7150 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -19,7 +19,7 @@ - + @@ -34,6 +34,12 @@ + + + + + + @@ -51,9 +57,11 @@ import ListH2sConfig from './components/listH2sConfig' import ListWellcoverConfig from '@/views/deviceConfig/components/listWellCoverConfig' import ListWellliquidConfig from '@/views/deviceConfig/components/listWellLiquidConfig' +import ListCombustibleGasConfig from '@/views/deviceConfig/components/ListCombustibleGasConfig' +import ListPressConfig from '@/views/deviceConfig/components/ListPressConfig' export default { name: 'DeviceConfig', - components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig }, + components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig, ListCombustibleGasConfig, ListPressConfig }, data() { return { activeName: 'liquid' @@ -86,6 +94,10 @@ this.$refs.h2sConfig.fetchData() } else if (tab.name === 'wellliquid') { this.$refs.wellliquidConfig.fetchData() + } else if (tab.name === 'combustibleGas') { + this.$refs.combustibleGasConfig.fetchData() + } else if (tab.name === 'press') { + this.$refs.pressConfig.fetchData() } }, // 计算那个是当前第一个tab @@ -112,6 +124,10 @@ this.activeName = 'h2s' } else if (hasPermission('/busConfig/wellliquidConfig/list')) { this.activeName = 'wellliquid' + } else if (hasPermission('/busConfig/combustibleGasConfig/list')) { + this.activeName = 'combustibleGas' + } else if (hasPermission('/busConfig/pressConfig/list')) { + this.activeName = 'press' } } } diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index 6380e1b..c501fde 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -33,6 +33,9 @@ {{ deviceForm.deptName }} + + {{ deviceForm.lineLength }} + diff --git a/README.md b/README.md index ae90135..f3ea3e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## 相关项目 本项目源于vue-element-admin。 +git分支:dev3.0 diff --git a/src/api/config/combustibleGasConfig.js b/src/api/config/combustibleGasConfig.js new file mode 100644 index 0000000..902f9f8 --- /dev/null +++ b/src/api/config/combustibleGasConfig.js @@ -0,0 +1,42 @@ +/** + * 点型可燃气体探测器接口 + */ +import request from '@/utils/request' +// 点型可燃气体探测器配置查询 +export function getKadConfigList(params) { + return request({ + url: 'busConfig/kadConfig/list', + method: 'get', + params + }) +} + +// 修改点型可燃气体探测器配置 +export function editKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportKadConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/kadConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportKadConfig(params) { + return request({ + url: 'busConfig/kadConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/config/pressConfig.js b/src/api/config/pressConfig.js new file mode 100644 index 0000000..7cdad80 --- /dev/null +++ b/src/api/config/pressConfig.js @@ -0,0 +1,42 @@ +/** + * 压力监测终端接口 + */ +import request from '@/utils/request' +// 压力监测终端配置查询 +export function getPressConfigList(params) { + return request({ + url: 'busConfig/pressConfig/list', + method: 'get', + params + }) +} + +// 修改压力监测终端配置 +export function editPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/config', + method: 'post', + params + }) +} + +// 批量导入 +export function batchImportPressConfig(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'busConfig/pressConfig/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportPressConfig(params) { + return request({ + url: 'busConfig/pressConfig/batchExport', + method: 'get', + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/data/data.js b/src/api/data/data.js index cba92e9..80a38e1 100644 --- a/src/api/data/data.js +++ b/src/api/data/data.js @@ -422,3 +422,59 @@ }) } +// 点型可燃气体探测器数据查询,不分页 +export function getKadDataSingle(params) { + return request({ + url: 'kad/list', + method: 'get', + params + }) +} + +// 点型可燃气体探测器数据查询 +export function getKadData(params) { + return request({ + url: 'kad/list-page', + method: 'get', + params + }) +} +// 批量导出点型可燃气体探测器数据 +export function batchExportKadData(params) { + return request({ + url: 'kad/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 压力监测终端数据查询,不分页 +export function getPressDataSingle(params) { + return request({ + url: 'press/list', + method: 'get', + params + }) +} + +// 压力监测终端数据查询 +export function getPressData(params) { + return request({ + url: 'press/list-page', + method: 'get', + params + }) +} +// 批量导出压力监测终端数据 +export function batchExportPressData(params) { + return request({ + url: 'press/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/device/deviceImei.js b/src/api/device/deviceImei.js index a816d0b..fffbb72 100644 --- a/src/api/device/deviceImei.js +++ b/src/api/device/deviceImei.js @@ -18,7 +18,7 @@ return request({ url: 'device/simManage/add', method: 'post', - params + data: params }) } // 修改设备 @@ -30,18 +30,16 @@ }) } // 删除设备 -export function delDeviceImei(ids) { +export function delDeviceImei(id) { return request({ url: 'device/simManage/delete', method: 'post', params: { - ids: ids - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + id: id } }) } + // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue index 44c099a..571b0e4 100644 --- a/src/views/dataManage/dataManage.vue +++ b/src/views/dataManage/dataManage.vue @@ -24,11 +24,13 @@ import ListHydrantData from '@/views/dataManage/deviceData/listHydrantData' import ListH2SData from '@/views/dataManage/deviceData/listH2SData' import ListWellLiquidData from '@/views/dataManage/deviceData/listWellLiquidData' +import ListCombustibleGasData from '@/views/dataManage/deviceData/listCombustibleGasData' +import ListPressData from '@/views/dataManage/deviceData/listPressData' import { parseUrl } from '@/utils/parseutils' export default { name: 'DataManage', - components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData }, + components: { ListH2SData, ListHydrantData, ListPantiltData, ListGasdectorData, ListTubeData, ListNoiseData, ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData, ListLiquidGasData, ListWellLiquidData, ListCombustibleGasData, ListPressData }, data() { return { activeName: 'wellcover', @@ -46,8 +48,10 @@ { permission: '/gasdector/list-page', label: '可燃气体智能监测终端', name: 'gasdector', type: '101', comp: 'list-gasdector-data' }, { permission: '/pantilt/list-page', label: '激光甲烷遥测云台', name: 'pantilt', type: '21', comp: 'list-pantilt-data' }, { permission: '/hydrantdata/list-page', label: '消防栓防盗水监测仪', name: 'hydrant', type: '11', comp: 'list-hydrant-data' }, - { permission: '/wellliquiddata/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, - { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' } + { permission: '/h2s/list-page', label: '硫化氢浓度监测仪', name: 'H2S', type: '14', comp: 'list-H2S-data' }, + { permission: '/wellliquiddata/list-page', label: '井盖液位一体机', name: 'wellliquid', type: '13', comp: 'list-well-liquid-data' }, + { permission: '/combustibleGas/list-page', label: '点型可燃气体探测器', name: 'combustibleGas', type: '32', comp: 'list-combustible-gas-data' }, + { permission: '/press/list-page', label: '压力监测终端', name: 'press', type: '31', comp: 'list-press-data' } ] // 所有tab列表 } }, @@ -79,6 +83,8 @@ mounted() { if (this.$route.query && this.$route.query.deviceType) { this.changeTab(this.$route.query.deviceType) + } else { + this.caclActive() } }, methods: { @@ -100,6 +106,7 @@ // 计算那个是当前第一个tab caclActive() { this.activeName = this.showTabList[0].name + console.log(this.showTabList[0].name) } } } diff --git a/src/views/dataManage/deviceData/listCombustibleGasData.vue b/src/views/dataManage/deviceData/listCombustibleGasData.vue new file mode 100644 index 0000000..eaf24e8 --- /dev/null +++ b/src/views/dataManage/deviceData/listCombustibleGasData.vue @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index eac828c..f2b7150 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -19,7 +19,7 @@ - + @@ -34,6 +34,12 @@ + + + + + + @@ -51,9 +57,11 @@ import ListH2sConfig from './components/listH2sConfig' import ListWellcoverConfig from '@/views/deviceConfig/components/listWellCoverConfig' import ListWellliquidConfig from '@/views/deviceConfig/components/listWellLiquidConfig' +import ListCombustibleGasConfig from '@/views/deviceConfig/components/ListCombustibleGasConfig' +import ListPressConfig from '@/views/deviceConfig/components/ListPressConfig' export default { name: 'DeviceConfig', - components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig }, + components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig, ListCombustibleGasConfig, ListPressConfig }, data() { return { activeName: 'liquid' @@ -86,6 +94,10 @@ this.$refs.h2sConfig.fetchData() } else if (tab.name === 'wellliquid') { this.$refs.wellliquidConfig.fetchData() + } else if (tab.name === 'combustibleGas') { + this.$refs.combustibleGasConfig.fetchData() + } else if (tab.name === 'press') { + this.$refs.pressConfig.fetchData() } }, // 计算那个是当前第一个tab @@ -112,6 +124,10 @@ this.activeName = 'h2s' } else if (hasPermission('/busConfig/wellliquidConfig/list')) { this.activeName = 'wellliquid' + } else if (hasPermission('/busConfig/combustibleGasConfig/list')) { + this.activeName = 'combustibleGas' + } else if (hasPermission('/busConfig/pressConfig/list')) { + this.activeName = 'press' } } } diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index 6380e1b..c501fde 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -33,6 +33,9 @@ {{ deviceForm.deptName }} + + {{ deviceForm.lineLength }} + diff --git a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue index 75aa9d5..fbb73b2 100644 --- a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue +++ b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue @@ -66,6 +66,7 @@ + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index eac828c..f2b7150 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -19,7 +19,7 @@ - + @@ -34,6 +34,12 @@ + + + + + + @@ -51,9 +57,11 @@ import ListH2sConfig from './components/listH2sConfig' import ListWellcoverConfig from '@/views/deviceConfig/components/listWellCoverConfig' import ListWellliquidConfig from '@/views/deviceConfig/components/listWellLiquidConfig' +import ListCombustibleGasConfig from '@/views/deviceConfig/components/ListCombustibleGasConfig' +import ListPressConfig from '@/views/deviceConfig/components/ListPressConfig' export default { name: 'DeviceConfig', - components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig }, + components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig, ListCombustibleGasConfig, ListPressConfig }, data() { return { activeName: 'liquid' @@ -86,6 +94,10 @@ this.$refs.h2sConfig.fetchData() } else if (tab.name === 'wellliquid') { this.$refs.wellliquidConfig.fetchData() + } else if (tab.name === 'combustibleGas') { + this.$refs.combustibleGasConfig.fetchData() + } else if (tab.name === 'press') { + this.$refs.pressConfig.fetchData() } }, // 计算那个是当前第一个tab @@ -112,6 +124,10 @@ this.activeName = 'h2s' } else if (hasPermission('/busConfig/wellliquidConfig/list')) { this.activeName = 'wellliquid' + } else if (hasPermission('/busConfig/combustibleGasConfig/list')) { + this.activeName = 'combustibleGas' + } else if (hasPermission('/busConfig/pressConfig/list')) { + this.activeName = 'press' } } } diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index 6380e1b..c501fde 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -33,6 +33,9 @@ {{ deviceForm.deptName }} + + {{ deviceForm.lineLength }} + diff --git a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue index 75aa9d5..fbb73b2 100644 --- a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue +++ b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue @@ -66,6 +66,7 @@ + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index eac828c..f2b7150 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -19,7 +19,7 @@ - + @@ -34,6 +34,12 @@ + + + + + + @@ -51,9 +57,11 @@ import ListH2sConfig from './components/listH2sConfig' import ListWellcoverConfig from '@/views/deviceConfig/components/listWellCoverConfig' import ListWellliquidConfig from '@/views/deviceConfig/components/listWellLiquidConfig' +import ListCombustibleGasConfig from '@/views/deviceConfig/components/ListCombustibleGasConfig' +import ListPressConfig from '@/views/deviceConfig/components/ListPressConfig' export default { name: 'DeviceConfig', - components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig }, + components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig, ListCombustibleGasConfig, ListPressConfig }, data() { return { activeName: 'liquid' @@ -86,6 +94,10 @@ this.$refs.h2sConfig.fetchData() } else if (tab.name === 'wellliquid') { this.$refs.wellliquidConfig.fetchData() + } else if (tab.name === 'combustibleGas') { + this.$refs.combustibleGasConfig.fetchData() + } else if (tab.name === 'press') { + this.$refs.pressConfig.fetchData() } }, // 计算那个是当前第一个tab @@ -112,6 +124,10 @@ this.activeName = 'h2s' } else if (hasPermission('/busConfig/wellliquidConfig/list')) { this.activeName = 'wellliquid' + } else if (hasPermission('/busConfig/combustibleGasConfig/list')) { + this.activeName = 'combustibleGas' + } else if (hasPermission('/busConfig/pressConfig/list')) { + this.activeName = 'press' } } } diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index 6380e1b..c501fde 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -33,6 +33,9 @@ {{ deviceForm.deptName }} + + {{ deviceForm.lineLength }} + diff --git a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue index 75aa9d5..fbb73b2 100644 --- a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue +++ b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue @@ -66,6 +66,7 @@ + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index eac828c..f2b7150 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -19,7 +19,7 @@ - + @@ -34,6 +34,12 @@ + + + + + + @@ -51,9 +57,11 @@ import ListH2sConfig from './components/listH2sConfig' import ListWellcoverConfig from '@/views/deviceConfig/components/listWellCoverConfig' import ListWellliquidConfig from '@/views/deviceConfig/components/listWellLiquidConfig' +import ListCombustibleGasConfig from '@/views/deviceConfig/components/ListCombustibleGasConfig' +import ListPressConfig from '@/views/deviceConfig/components/ListPressConfig' export default { name: 'DeviceConfig', - components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig }, + components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig, ListCombustibleGasConfig, ListPressConfig }, data() { return { activeName: 'liquid' @@ -86,6 +94,10 @@ this.$refs.h2sConfig.fetchData() } else if (tab.name === 'wellliquid') { this.$refs.wellliquidConfig.fetchData() + } else if (tab.name === 'combustibleGas') { + this.$refs.combustibleGasConfig.fetchData() + } else if (tab.name === 'press') { + this.$refs.pressConfig.fetchData() } }, // 计算那个是当前第一个tab @@ -112,6 +124,10 @@ this.activeName = 'h2s' } else if (hasPermission('/busConfig/wellliquidConfig/list')) { this.activeName = 'wellliquid' + } else if (hasPermission('/busConfig/combustibleGasConfig/list')) { + this.activeName = 'combustibleGas' + } else if (hasPermission('/busConfig/pressConfig/list')) { + this.activeName = 'press' } } } diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index 6380e1b..c501fde 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -33,6 +33,9 @@ {{ deviceForm.deptName }} + + {{ deviceForm.lineLength }} + diff --git a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue index 75aa9d5..fbb73b2 100644 --- a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue +++ b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue @@ -66,6 +66,7 @@ + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index eac828c..f2b7150 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -19,7 +19,7 @@ - + @@ -34,6 +34,12 @@ + + + + + + @@ -51,9 +57,11 @@ import ListH2sConfig from './components/listH2sConfig' import ListWellcoverConfig from '@/views/deviceConfig/components/listWellCoverConfig' import ListWellliquidConfig from '@/views/deviceConfig/components/listWellLiquidConfig' +import ListCombustibleGasConfig from '@/views/deviceConfig/components/ListCombustibleGasConfig' +import ListPressConfig from '@/views/deviceConfig/components/ListPressConfig' export default { name: 'DeviceConfig', - components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig }, + components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig, ListCombustibleGasConfig, ListPressConfig }, data() { return { activeName: 'liquid' @@ -86,6 +94,10 @@ this.$refs.h2sConfig.fetchData() } else if (tab.name === 'wellliquid') { this.$refs.wellliquidConfig.fetchData() + } else if (tab.name === 'combustibleGas') { + this.$refs.combustibleGasConfig.fetchData() + } else if (tab.name === 'press') { + this.$refs.pressConfig.fetchData() } }, // 计算那个是当前第一个tab @@ -112,6 +124,10 @@ this.activeName = 'h2s' } else if (hasPermission('/busConfig/wellliquidConfig/list')) { this.activeName = 'wellliquid' + } else if (hasPermission('/busConfig/combustibleGasConfig/list')) { + this.activeName = 'combustibleGas' + } else if (hasPermission('/busConfig/pressConfig/list')) { + this.activeName = 'press' } } } diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index 6380e1b..c501fde 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -33,6 +33,9 @@ {{ deviceForm.deptName }} + + {{ deviceForm.lineLength }} + diff --git a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue index 75aa9d5..fbb73b2 100644 --- a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue +++ b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue @@ -66,6 +66,7 @@ + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index eac828c..f2b7150 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -19,7 +19,7 @@ - + @@ -34,6 +34,12 @@ + + + + + + @@ -51,9 +57,11 @@ import ListH2sConfig from './components/listH2sConfig' import ListWellcoverConfig from '@/views/deviceConfig/components/listWellCoverConfig' import ListWellliquidConfig from '@/views/deviceConfig/components/listWellLiquidConfig' +import ListCombustibleGasConfig from '@/views/deviceConfig/components/ListCombustibleGasConfig' +import ListPressConfig from '@/views/deviceConfig/components/ListPressConfig' export default { name: 'DeviceConfig', - components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig }, + components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig, ListCombustibleGasConfig, ListPressConfig }, data() { return { activeName: 'liquid' @@ -86,6 +94,10 @@ this.$refs.h2sConfig.fetchData() } else if (tab.name === 'wellliquid') { this.$refs.wellliquidConfig.fetchData() + } else if (tab.name === 'combustibleGas') { + this.$refs.combustibleGasConfig.fetchData() + } else if (tab.name === 'press') { + this.$refs.pressConfig.fetchData() } }, // 计算那个是当前第一个tab @@ -112,6 +124,10 @@ this.activeName = 'h2s' } else if (hasPermission('/busConfig/wellliquidConfig/list')) { this.activeName = 'wellliquid' + } else if (hasPermission('/busConfig/combustibleGasConfig/list')) { + this.activeName = 'combustibleGas' + } else if (hasPermission('/busConfig/pressConfig/list')) { + this.activeName = 'press' } } } diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index 6380e1b..c501fde 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -33,6 +33,9 @@ {{ deviceForm.deptName }} + + {{ deviceForm.lineLength }} + diff --git a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue index 75aa9d5..fbb73b2 100644 --- a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue +++ b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue @@ -66,6 +66,7 @@ + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index eac828c..f2b7150 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -19,7 +19,7 @@ - + @@ -34,6 +34,12 @@ + + + + + + @@ -51,9 +57,11 @@ import ListH2sConfig from './components/listH2sConfig' import ListWellcoverConfig from '@/views/deviceConfig/components/listWellCoverConfig' import ListWellliquidConfig from '@/views/deviceConfig/components/listWellLiquidConfig' +import ListCombustibleGasConfig from '@/views/deviceConfig/components/ListCombustibleGasConfig' +import ListPressConfig from '@/views/deviceConfig/components/ListPressConfig' export default { name: 'DeviceConfig', - components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig }, + components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig, ListCombustibleGasConfig, ListPressConfig }, data() { return { activeName: 'liquid' @@ -86,6 +94,10 @@ this.$refs.h2sConfig.fetchData() } else if (tab.name === 'wellliquid') { this.$refs.wellliquidConfig.fetchData() + } else if (tab.name === 'combustibleGas') { + this.$refs.combustibleGasConfig.fetchData() + } else if (tab.name === 'press') { + this.$refs.pressConfig.fetchData() } }, // 计算那个是当前第一个tab @@ -112,6 +124,10 @@ this.activeName = 'h2s' } else if (hasPermission('/busConfig/wellliquidConfig/list')) { this.activeName = 'wellliquid' + } else if (hasPermission('/busConfig/combustibleGasConfig/list')) { + this.activeName = 'combustibleGas' + } else if (hasPermission('/busConfig/pressConfig/list')) { + this.activeName = 'press' } } } diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index 6380e1b..c501fde 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -33,6 +33,9 @@ {{ deviceForm.deptName }} + + {{ deviceForm.lineLength }} + diff --git a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue index 75aa9d5..fbb73b2 100644 --- a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue +++ b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue @@ -66,6 +66,7 @@ + + diff --git a/src/views/dataManage/deviceData/listPressData.vue b/src/views/dataManage/deviceData/listPressData.vue new file mode 100644 index 0000000..b367134 --- /dev/null +++ b/src/views/dataManage/deviceData/listPressData.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + + {{ scope.row[column.value] }} + {{ scope.row[column.value] }} + + + + + + + + + + diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue index 49ee723..aaf253b 100644 --- a/src/views/dataView/components/panelGroup.vue +++ b/src/views/dataView/components/panelGroup.vue @@ -120,7 +120,12 @@ const endTime = new Date().Format('yyyy-MM-dd hh:mm:ss') const params = { beginTime, endTime } dataCount(params).then(response => { - this.dataGroup[2].context = response.data.total + let count = 0 + response.data.forEach(item => { + count = count + Number(item.countRecords) + }) + this.dataGroup[2].context = count + '' + console.log('今日总数', this.dataGroup[2].context) }) } } diff --git a/src/views/deviceConfig/components/ListCombustibleGasConfig.vue b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue new file mode 100644 index 0000000..7356226 --- /dev/null +++ b/src/views/deviceConfig/components/ListCombustibleGasConfig.vue @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/ListPressConfig.vue b/src/views/deviceConfig/components/ListPressConfig.vue new file mode 100644 index 0000000..927a804 --- /dev/null +++ b/src/views/deviceConfig/components/ListPressConfig.vue @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + 数据列表 + + + + + 导出记录 + + + + + 批量导入 + + + + 新增 + + + + + + + + + {{ scope.row[column.value] }} + + + + + + 编辑 + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editCombustibleGasConfig.vue b/src/views/deviceConfig/components/editCombustibleGasConfig.vue new file mode 100644 index 0000000..e59c2c3 --- /dev/null +++ b/src/views/deviceConfig/components/editCombustibleGasConfig.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue index 1c992fc..5f9adb1 100644 --- a/src/views/deviceConfig/components/editLiquidConfig.vue +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -61,15 +61,15 @@ - - + + - + @@ -205,7 +205,7 @@ percent: '', // 报警阈值 installHeight: '', // 安装高度 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 retryTimes: '3', // 重传次数 ip: '', // ip地址 @@ -223,7 +223,7 @@ percent: [{ required: true, trigger: ['blur', 'change'], validator: validatePercent }], installHeight: [{ required: true, trigger: ['blur', 'change'], validator: validateInstallHeight }], collectInterval: [{ required: false, trigger: ['blur', 'change'], validator: validatecollectInterval }], - collectCnt: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], + collectCount: [{ required: false, trigger: ['blur', 'change'], validator: validateCollectCnt }], dataThreshold: [{ required: false, trigger: ['blur', 'change'], validator: validateDataThreshold }], deviceId: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], ip: [{ trigger: ['blur', 'change'], validator: validateIp }], @@ -280,7 +280,7 @@ installHeight: row.installHeight, // 安装高度 retryTimes: row.retryTimes, // 重传次数 collectInterval: row.collectInterval, // 采集间隔 - collectCnt: row.collectCnt || '', // 采集次数,数据上报间隔 + collectCount: row.collectCount || '', // 采集次数,数据上报间隔 dataThreshold: row.dataThreshold || '', // 边界阈值 ip: row.ip, // ip地址 port: row.port, // 端口号 @@ -302,7 +302,7 @@ installHeight: '', // 安装高度 retryTimes: '3', // 重传次数 collectInterval: '', // 采集间隔 - collectCnt: '', // 采集次数,数据上报间隔 + collectCount: '', // 采集次数,数据上报间隔 dataThreshold: '', // 边界阈值 ip: '', // ip地址 port: '', // 端口号 diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index b34b450..448546c 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -103,7 +103,7 @@ + + diff --git a/src/views/deviceConfig/components/listH2sConfig.vue b/src/views/deviceConfig/components/listH2sConfig.vue index 3555e1e..7bacc1d 100644 --- a/src/views/deviceConfig/components/listH2sConfig.vue +++ b/src/views/deviceConfig/components/listH2sConfig.vue @@ -163,7 +163,7 @@ fullscreenLoading: false, // 全屏加载动画 editShow: false, // 是否显示编辑框 detailShow: false, // 是否显示编辑框 - filename: 'methane_config_template.xlsx', + filename: 'h2s_config_template.xlsx', deptShowTop: false, fileList: [] } diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue index 8ba85bc..ed4faab 100644 --- a/src/views/deviceConfig/components/listLiquidConfig.vue +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -127,14 +127,14 @@ }, { text: '采集次数', - value: 'collectCnt', + value: 'collectCount', align: 'center' }, - { - text: '边界阈值', - value: 'dataThreshold', - align: 'center' - }, + // { + // text: '边界阈值', + // value: 'dataThreshold', + // align: 'center' + // }, { text: 'IP地址', value: 'ip', diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index eac828c..f2b7150 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -19,7 +19,7 @@ - + @@ -34,6 +34,12 @@ + + + + + + @@ -51,9 +57,11 @@ import ListH2sConfig from './components/listH2sConfig' import ListWellcoverConfig from '@/views/deviceConfig/components/listWellCoverConfig' import ListWellliquidConfig from '@/views/deviceConfig/components/listWellLiquidConfig' +import ListCombustibleGasConfig from '@/views/deviceConfig/components/ListCombustibleGasConfig' +import ListPressConfig from '@/views/deviceConfig/components/ListPressConfig' export default { name: 'DeviceConfig', - components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig }, + components: { ListWellliquidConfig, ListWellcoverConfig, ListH2sConfig, ListTubeConfig, ListLiquidGasConfig, ListNoiseConfig, ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig, ListCombustibleGasConfig, ListPressConfig }, data() { return { activeName: 'liquid' @@ -86,6 +94,10 @@ this.$refs.h2sConfig.fetchData() } else if (tab.name === 'wellliquid') { this.$refs.wellliquidConfig.fetchData() + } else if (tab.name === 'combustibleGas') { + this.$refs.combustibleGasConfig.fetchData() + } else if (tab.name === 'press') { + this.$refs.pressConfig.fetchData() } }, // 计算那个是当前第一个tab @@ -112,6 +124,10 @@ this.activeName = 'h2s' } else if (hasPermission('/busConfig/wellliquidConfig/list')) { this.activeName = 'wellliquid' + } else if (hasPermission('/busConfig/combustibleGasConfig/list')) { + this.activeName = 'combustibleGas' + } else if (hasPermission('/busConfig/pressConfig/list')) { + this.activeName = 'press' } } } diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index 6380e1b..c501fde 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -33,6 +33,9 @@ {{ deviceForm.deptName }} + + {{ deviceForm.lineLength }} + diff --git a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue index 75aa9d5..fbb73b2 100644 --- a/src/views/deviceManage/deviceImei/components/editDeviceImei.vue +++ b/src/views/deviceManage/deviceImei/components/editDeviceImei.vue @@ -66,6 +66,7 @@