diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index eefc549..8285ee7 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -3,110 +3,114 @@ - - + + - - + + - + + + - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index eefc549..8285ee7 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -3,110 +3,114 @@ - - + + - - + + - + + + - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index eefc549..8285ee7 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -3,110 +3,114 @@ - - + + - - + + - + + + - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index eefc549..8285ee7 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -3,110 +3,114 @@ - - + + - - + + - + + + - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index eefc549..8285ee7 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -3,110 +3,114 @@ - - + + - - + + - + + + - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue new file mode 100644 index 0000000..ba81bec --- /dev/null +++ b/src/views/deviceStatics/components/deviceCountByOffline.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index eefc549..8285ee7 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -3,110 +3,114 @@ - - + + - - + + - + + + - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue new file mode 100644 index 0000000..ba81bec --- /dev/null +++ b/src/views/deviceStatics/components/deviceCountByOffline.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue index 6e71cf8..20adea4 100644 --- a/src/views/deviceStatics/components/deviceCountByType.vue +++ b/src/views/deviceStatics/components/deviceCountByType.vue @@ -1,62 +1,99 @@ diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index eefc549..8285ee7 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -3,110 +3,114 @@ - - + + - - + + - + + + - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue new file mode 100644 index 0000000..ba81bec --- /dev/null +++ b/src/views/deviceStatics/components/deviceCountByOffline.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue index 6e71cf8..20adea4 100644 --- a/src/views/deviceStatics/components/deviceCountByType.vue +++ b/src/views/deviceStatics/components/deviceCountByType.vue @@ -1,62 +1,99 @@ diff --git a/src/views/deviceStatics/components/editDeviceStatics.vue b/src/views/deviceStatics/components/editDeviceStatics.vue new file mode 100644 index 0000000..959e7da --- /dev/null +++ b/src/views/deviceStatics/components/editDeviceStatics.vue @@ -0,0 +1,322 @@ + + + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index eefc549..8285ee7 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -3,110 +3,114 @@ - - + + - - + + - + + + - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue new file mode 100644 index 0000000..ba81bec --- /dev/null +++ b/src/views/deviceStatics/components/deviceCountByOffline.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue index 6e71cf8..20adea4 100644 --- a/src/views/deviceStatics/components/deviceCountByType.vue +++ b/src/views/deviceStatics/components/deviceCountByType.vue @@ -1,62 +1,99 @@ diff --git a/src/views/deviceStatics/components/editDeviceStatics.vue b/src/views/deviceStatics/components/editDeviceStatics.vue new file mode 100644 index 0000000..959e7da --- /dev/null +++ b/src/views/deviceStatics/components/editDeviceStatics.vue @@ -0,0 +1,322 @@ + + + + + diff --git a/src/views/deviceStatics/components/listdeviceOffline.vue b/src/views/deviceStatics/components/listdeviceOffline.vue new file mode 100644 index 0000000..dd748fc --- /dev/null +++ b/src/views/deviceStatics/components/listdeviceOffline.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index eefc549..8285ee7 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -3,110 +3,114 @@ - - + + - - + + - + + + - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue new file mode 100644 index 0000000..ba81bec --- /dev/null +++ b/src/views/deviceStatics/components/deviceCountByOffline.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue index 6e71cf8..20adea4 100644 --- a/src/views/deviceStatics/components/deviceCountByType.vue +++ b/src/views/deviceStatics/components/deviceCountByType.vue @@ -1,62 +1,99 @@ diff --git a/src/views/deviceStatics/components/editDeviceStatics.vue b/src/views/deviceStatics/components/editDeviceStatics.vue new file mode 100644 index 0000000..959e7da --- /dev/null +++ b/src/views/deviceStatics/components/editDeviceStatics.vue @@ -0,0 +1,322 @@ + + + + + diff --git a/src/views/deviceStatics/components/listdeviceOffline.vue b/src/views/deviceStatics/components/listdeviceOffline.vue new file mode 100644 index 0000000..dd748fc --- /dev/null +++ b/src/views/deviceStatics/components/listdeviceOffline.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/src/views/deviceStatics/deviceStatics.vue b/src/views/deviceStatics/deviceStatics.vue index 3f04678..001410b 100644 --- a/src/views/deviceStatics/deviceStatics.vue +++ b/src/views/deviceStatics/deviceStatics.vue @@ -1,30 +1,44 @@ - + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js new file mode 100644 index 0000000..1f0650d --- /dev/null +++ b/mock/deviceManage/device.js @@ -0,0 +1,672 @@ +const deviceList = [ + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '开挖监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖状态监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '液位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能监测终端', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '噪声记录仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '有害气体监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '温湿度监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '井盖定位监测仪', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '燃气智能终端(一体化)', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + }, + { + 'bfzt': '0', + 'bfztName': '撤防', + 'communication': '3,4', + 'concenCode': '', + 'concenId': '', + 'deptName': '燃气集团总公司', + 'deptid': '24', + 'installHeight': '123', + 'devcode': '342021000001', + 'deviceName': '', + 'deviceType': '12', + 'deviceTypeName': '管盯', + 'id': '1476131375777120257', + 'installDate': '2021-12-29', + 'modelId': '19', + 'modelName': 'BIRMM-RTU100N', + 'onlineState': '1', + 'onlineStateName': '在线', + 'position': 'test001位置', + 'ts': '2021-12-29', + 'valid': '1', + 'watchType': '燃气泄漏', + 'wellCode': 'test001', + 'wellId': '4453' + } +] +const deviceStaticsList = [ + { + 'deptName': '燃气集团总公司', + 'deviceCount': '11', + 'deptid': '24' + }, + { + 'deptName': '煤气公司', + 'deviceCount': '2', + 'deptid': '24' + }, + { + 'deptName': '电力公司', + 'deviceCount': '11', + 'deptid': '24' + } + +] +const deviceOnlineList = [ + { + 'deviceType': '井盖状态监测仪', + 'online': 1, + 'offline': 9 + }, + { + 'deviceType': '燃气智能监测终端', + 'online': 1, + 'offline': 2 + }, + { + 'deviceType': '管盯', + 'online': 1, + 'offline': 6 + } + +] +const deviceOfflineList = [ + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + }, + { + 'deviceId': '2313221', + 'deviceType': 'fsdf32113', + 'deviceTypeName': '井盖状态检测仪', + 'wellId': 'test1321', + 'wellCode': 'test3134', + 'coordinateX': '原始经度84', + 'coordinateY': '原始纬度84', + 'latBaidu': '百度坐标纬度', + 'lngBaidu': '百度坐标经度', + 'latGaode': '高德坐标纬度', + 'lngGaode': '高德坐标经度', + 'position': '位置', + 'lastTime': '2022/04/12', + 'offlineDays': '21' + } +] +module.exports = [ + // mock get all routes form server + { + url: '/device/list', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceStaticsByDept', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceStaticsList, + message: '请求成功', + success: true + } + } + }, + { + url: '/statics/deviceCountByOnlineStatus', + type: 'get', + response: _ => { + return { + code: 200, + data: deviceOnlineList, + message: '请求成功', + success: true + } + } + }, + { + url: '/device/offlineListPage', + type: 'get', + response: _ => { + return { + code: 200, + 'total': 120, + data: deviceOfflineList, + message: '请求成功', + success: true + } + } + } +] diff --git a/mock/index.js b/mock/index.js index 6646246..0e60e80 100644 --- a/mock/index.js +++ b/mock/index.js @@ -12,6 +12,7 @@ const dashboard = require('./biz/dashboard') const search = require('./remote-search') const overview = require('./biz/overview') +const device = require('./deviceManage/device') const deviceType = require('./deviceManage/deviceType') const deviceModels = require('./deviceManage/deviceModels') const deviceImei = require('./deviceManage/deviceImei') @@ -42,7 +43,8 @@ ...tenantConfig, ...deptPermission, ...tenant, - ...warningRule + ...warningRule, + ...device ] // for front mock diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js index b96a05e..04f756a 100644 --- a/src/api/data/dataStatics.js +++ b/src/api/data/dataStatics.js @@ -11,6 +11,14 @@ params }) } +// 离线设备列表 +export function offlineList(params) { + return request({ + url: 'device/offlineListPage', + method: 'get', + params + }) +} // 根据权属单位统计井数量 export function wellStaticByDept(params) { return request({ @@ -38,6 +46,15 @@ }) } +// 离线设备数量 +export function deviceStaticsByOnline(params) { + return request({ + url: 'statics/deviceCountByOnlineStatus', + method: 'get', + params + }) +} + // 根据权属单位统计设备数量 export function deviceStaticsByDept(params) { return request({ diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9e23838..3fdc6db 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -69,7 +69,7 @@ - + @@ -141,6 +141,12 @@ return [] } }, // 数据 + height: { + type: Number, + default: function() { + return [] + } + }, total: { type: Number, default: 0 diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue new file mode 100644 index 0000000..5a2b795 --- /dev/null +++ b/src/views/deviceManage/components/listDigData.vue @@ -0,0 +1,19 @@ + + + + diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue new file mode 100644 index 0000000..ccbaa8b --- /dev/null +++ b/src/views/deviceManage/components/listGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue new file mode 100644 index 0000000..687f9bc --- /dev/null +++ b/src/views/deviceManage/components/listHarmfulData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue new file mode 100644 index 0000000..f279ee9 --- /dev/null +++ b/src/views/deviceManage/components/listLiquidData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue new file mode 100644 index 0000000..6f5535e --- /dev/null +++ b/src/views/deviceManage/components/listLiquidGasData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listNoiseData.vue b/src/views/deviceManage/components/listNoiseData.vue new file mode 100644 index 0000000..7dad007 --- /dev/null +++ b/src/views/deviceManage/components/listNoiseData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTempData.vue b/src/views/deviceManage/components/listTempData.vue new file mode 100644 index 0000000..f7548b5 --- /dev/null +++ b/src/views/deviceManage/components/listTempData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listTubeData.vue b/src/views/deviceManage/components/listTubeData.vue new file mode 100644 index 0000000..94f1772 --- /dev/null +++ b/src/views/deviceManage/components/listTubeData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellData.vue b/src/views/deviceManage/components/listWellData.vue new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/src/views/deviceManage/components/listWellData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/components/listWellLocaData.vue b/src/views/deviceManage/components/listWellLocaData.vue new file mode 100644 index 0000000..f784671 --- /dev/null +++ b/src/views/deviceManage/components/listWellLocaData.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index eefc549..8285ee7 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -3,110 +3,114 @@ - - + + - - + + - + + + - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue new file mode 100644 index 0000000..ba81bec --- /dev/null +++ b/src/views/deviceStatics/components/deviceCountByOffline.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue index 6e71cf8..20adea4 100644 --- a/src/views/deviceStatics/components/deviceCountByType.vue +++ b/src/views/deviceStatics/components/deviceCountByType.vue @@ -1,62 +1,99 @@ diff --git a/src/views/deviceStatics/components/editDeviceStatics.vue b/src/views/deviceStatics/components/editDeviceStatics.vue new file mode 100644 index 0000000..959e7da --- /dev/null +++ b/src/views/deviceStatics/components/editDeviceStatics.vue @@ -0,0 +1,322 @@ + + + + + diff --git a/src/views/deviceStatics/components/listdeviceOffline.vue b/src/views/deviceStatics/components/listdeviceOffline.vue new file mode 100644 index 0000000..dd748fc --- /dev/null +++ b/src/views/deviceStatics/components/listdeviceOffline.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/src/views/deviceStatics/deviceStatics.vue b/src/views/deviceStatics/deviceStatics.vue index 3f04678..001410b 100644 --- a/src/views/deviceStatics/deviceStatics.vue +++ b/src/views/deviceStatics/deviceStatics.vue @@ -1,30 +1,44 @@ - + diff --git a/src/views/systemConfig/deptPermission/deptPermission.vue b/src/views/systemConfig/deptPermission/deptPermission.vue index 4305f54..66e0a5f 100644 --- a/src/views/systemConfig/deptPermission/deptPermission.vue +++ b/src/views/systemConfig/deptPermission/deptPermission.vue @@ -1,7 +1,6 @@