diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/mile/listTime.vue b/src/views/mile/listTime.vue new file mode 100644 index 0000000..f4f8613 --- /dev/null +++ b/src/views/mile/listTime.vue @@ -0,0 +1,206 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/mile/listTime.vue b/src/views/mile/listTime.vue new file mode 100644 index 0000000..f4f8613 --- /dev/null +++ b/src/views/mile/listTime.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue new file mode 100644 index 0000000..4dee730 --- /dev/null +++ b/src/views/overview/listoverview.vue @@ -0,0 +1,582 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/mile/listTime.vue b/src/views/mile/listTime.vue new file mode 100644 index 0000000..f4f8613 --- /dev/null +++ b/src/views/mile/listTime.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue new file mode 100644 index 0000000..4dee730 --- /dev/null +++ b/src/views/overview/listoverview.vue @@ -0,0 +1,582 @@ + + + + diff --git a/src/views/overview/track.vue b/src/views/overview/track.vue new file mode 100644 index 0000000..8d977b7 --- /dev/null +++ b/src/views/overview/track.vue @@ -0,0 +1,187 @@ + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/mile/listTime.vue b/src/views/mile/listTime.vue new file mode 100644 index 0000000..f4f8613 --- /dev/null +++ b/src/views/mile/listTime.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue new file mode 100644 index 0000000..4dee730 --- /dev/null +++ b/src/views/overview/listoverview.vue @@ -0,0 +1,582 @@ + + + + diff --git a/src/views/overview/track.vue b/src/views/overview/track.vue new file mode 100644 index 0000000..8d977b7 --- /dev/null +++ b/src/views/overview/track.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/overview/trail.vue b/src/views/overview/trail.vue new file mode 100644 index 0000000..ddbd191 --- /dev/null +++ b/src/views/overview/trail.vue @@ -0,0 +1,362 @@ + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/mile/listTime.vue b/src/views/mile/listTime.vue new file mode 100644 index 0000000..f4f8613 --- /dev/null +++ b/src/views/mile/listTime.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue new file mode 100644 index 0000000..4dee730 --- /dev/null +++ b/src/views/overview/listoverview.vue @@ -0,0 +1,582 @@ + + + + diff --git a/src/views/overview/track.vue b/src/views/overview/track.vue new file mode 100644 index 0000000..8d977b7 --- /dev/null +++ b/src/views/overview/track.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/overview/trail.vue b/src/views/overview/trail.vue new file mode 100644 index 0000000..ddbd191 --- /dev/null +++ b/src/views/overview/trail.vue @@ -0,0 +1,362 @@ + + + diff --git a/src/views/overview/trailStatic.vue b/src/views/overview/trailStatic.vue new file mode 100644 index 0000000..7f49888 --- /dev/null +++ b/src/views/overview/trailStatic.vue @@ -0,0 +1,131 @@ + + + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/mile/listTime.vue b/src/views/mile/listTime.vue new file mode 100644 index 0000000..f4f8613 --- /dev/null +++ b/src/views/mile/listTime.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue new file mode 100644 index 0000000..4dee730 --- /dev/null +++ b/src/views/overview/listoverview.vue @@ -0,0 +1,582 @@ + + + + diff --git a/src/views/overview/track.vue b/src/views/overview/track.vue new file mode 100644 index 0000000..8d977b7 --- /dev/null +++ b/src/views/overview/track.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/overview/trail.vue b/src/views/overview/trail.vue new file mode 100644 index 0000000..ddbd191 --- /dev/null +++ b/src/views/overview/trail.vue @@ -0,0 +1,362 @@ + + + diff --git a/src/views/overview/trailStatic.vue b/src/views/overview/trailStatic.vue new file mode 100644 index 0000000..7f49888 --- /dev/null +++ b/src/views/overview/trailStatic.vue @@ -0,0 +1,131 @@ + + + + + + diff --git a/src/views/route/addRoute.vue b/src/views/route/addRoute.vue new file mode 100644 index 0000000..4997de5 --- /dev/null +++ b/src/views/route/addRoute.vue @@ -0,0 +1,440 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/mile/listTime.vue b/src/views/mile/listTime.vue new file mode 100644 index 0000000..f4f8613 --- /dev/null +++ b/src/views/mile/listTime.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue new file mode 100644 index 0000000..4dee730 --- /dev/null +++ b/src/views/overview/listoverview.vue @@ -0,0 +1,582 @@ + + + + diff --git a/src/views/overview/track.vue b/src/views/overview/track.vue new file mode 100644 index 0000000..8d977b7 --- /dev/null +++ b/src/views/overview/track.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/overview/trail.vue b/src/views/overview/trail.vue new file mode 100644 index 0000000..ddbd191 --- /dev/null +++ b/src/views/overview/trail.vue @@ -0,0 +1,362 @@ + + + diff --git a/src/views/overview/trailStatic.vue b/src/views/overview/trailStatic.vue new file mode 100644 index 0000000..7f49888 --- /dev/null +++ b/src/views/overview/trailStatic.vue @@ -0,0 +1,131 @@ + + + + + + diff --git a/src/views/route/addRoute.vue b/src/views/route/addRoute.vue new file mode 100644 index 0000000..4997de5 --- /dev/null +++ b/src/views/route/addRoute.vue @@ -0,0 +1,440 @@ + + + + diff --git a/src/views/route/detailRoute.vue b/src/views/route/detailRoute.vue new file mode 100644 index 0000000..5501b36 --- /dev/null +++ b/src/views/route/detailRoute.vue @@ -0,0 +1,364 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/mile/listTime.vue b/src/views/mile/listTime.vue new file mode 100644 index 0000000..f4f8613 --- /dev/null +++ b/src/views/mile/listTime.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue new file mode 100644 index 0000000..4dee730 --- /dev/null +++ b/src/views/overview/listoverview.vue @@ -0,0 +1,582 @@ + + + + diff --git a/src/views/overview/track.vue b/src/views/overview/track.vue new file mode 100644 index 0000000..8d977b7 --- /dev/null +++ b/src/views/overview/track.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/overview/trail.vue b/src/views/overview/trail.vue new file mode 100644 index 0000000..ddbd191 --- /dev/null +++ b/src/views/overview/trail.vue @@ -0,0 +1,362 @@ + + + diff --git a/src/views/overview/trailStatic.vue b/src/views/overview/trailStatic.vue new file mode 100644 index 0000000..7f49888 --- /dev/null +++ b/src/views/overview/trailStatic.vue @@ -0,0 +1,131 @@ + + + + + + diff --git a/src/views/route/addRoute.vue b/src/views/route/addRoute.vue new file mode 100644 index 0000000..4997de5 --- /dev/null +++ b/src/views/route/addRoute.vue @@ -0,0 +1,440 @@ + + + + diff --git a/src/views/route/detailRoute.vue b/src/views/route/detailRoute.vue new file mode 100644 index 0000000..5501b36 --- /dev/null +++ b/src/views/route/detailRoute.vue @@ -0,0 +1,364 @@ + + + + diff --git a/src/views/route/editRoute.vue b/src/views/route/editRoute.vue new file mode 100644 index 0000000..6ce4730 --- /dev/null +++ b/src/views/route/editRoute.vue @@ -0,0 +1,495 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/mile/listTime.vue b/src/views/mile/listTime.vue new file mode 100644 index 0000000..f4f8613 --- /dev/null +++ b/src/views/mile/listTime.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue new file mode 100644 index 0000000..4dee730 --- /dev/null +++ b/src/views/overview/listoverview.vue @@ -0,0 +1,582 @@ + + + + diff --git a/src/views/overview/track.vue b/src/views/overview/track.vue new file mode 100644 index 0000000..8d977b7 --- /dev/null +++ b/src/views/overview/track.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/overview/trail.vue b/src/views/overview/trail.vue new file mode 100644 index 0000000..ddbd191 --- /dev/null +++ b/src/views/overview/trail.vue @@ -0,0 +1,362 @@ + + + diff --git a/src/views/overview/trailStatic.vue b/src/views/overview/trailStatic.vue new file mode 100644 index 0000000..7f49888 --- /dev/null +++ b/src/views/overview/trailStatic.vue @@ -0,0 +1,131 @@ + + + + + + diff --git a/src/views/route/addRoute.vue b/src/views/route/addRoute.vue new file mode 100644 index 0000000..4997de5 --- /dev/null +++ b/src/views/route/addRoute.vue @@ -0,0 +1,440 @@ + + + + diff --git a/src/views/route/detailRoute.vue b/src/views/route/detailRoute.vue new file mode 100644 index 0000000..5501b36 --- /dev/null +++ b/src/views/route/detailRoute.vue @@ -0,0 +1,364 @@ + + + + diff --git a/src/views/route/editRoute.vue b/src/views/route/editRoute.vue new file mode 100644 index 0000000..6ce4730 --- /dev/null +++ b/src/views/route/editRoute.vue @@ -0,0 +1,495 @@ + + + + diff --git a/src/views/route/listRoute.vue b/src/views/route/listRoute.vue new file mode 100644 index 0000000..d40f63d --- /dev/null +++ b/src/views/route/listRoute.vue @@ -0,0 +1,221 @@ + + + + diff --git a/package.json b/package.json index 45f055f..658aeb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "jsencrypt": "^3.0.0-rc.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "leaflet-rotatedmarker": "^0.2.0", + "leaflet.pm": "^2.2.0", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..67cd545 --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,69 @@ +/** + * 车辆违规管理接口 + */ +import request from '@/utils/request' +export function getThresholdList(params) { + return request({ + url: 'car/busAlarmThreshold/listPage', + method: 'get', + params + }) +} + +export function updateThreshold(params) { + return request({ + url: 'car/busAlarmThreshold/addOrUpdate', + method: 'post', + params + }) +} +export function getRecordList(params) { + return request({ + url: 'car/busAlarmRecord/listPage', + method: 'get', + params + }) +} +export function getDataList(params) { + return request({ + url: 'car/busAlarmRecord/statics', + method: 'get', + params + }) +} +// 批量导出 +export function exportRecord(params) { + return request({ + url: 'car/busAlarmRecord/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +export function getOffineList(params) { + return request({ + url: 'car/busCarPosition/offlineStatics', + method: 'get', + params + }) +} +// 批量导出 +export function exportOffline(params) { + return request({ + url: 'car/busCarPosition/offlineExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +export function getRecordDetail(id) { + return request({ + url: 'car/busAlarmRecord/detail/' + id, + method: 'get', + params: { + } + }) +} diff --git a/src/api/carInfo.js b/src/api/carInfo.js new file mode 100644 index 0000000..b749b01 --- /dev/null +++ b/src/api/carInfo.js @@ -0,0 +1,57 @@ +/** + * 车辆信息管理接口 + */ +import request from '@/utils/request' +// 车辆信息查询 +export function getCarInfoList(params) { + return request({ + url: 'car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆信息详情查询 +export function getCarInfo(id) { + return request({ + url: 'car/busCarInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 添加车辆信息 +export function addCarInfo(params) { + return request({ + url: 'car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆信息 +export function updateCarInfo(params) { + return request({ + url: 'car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆信息 +export function delCarInfo(id) { + return request({ + url: 'car/busCarInfo/delete', + method: 'get', + params: { + busCarInfoId: id + } + }) +} +// 批量导出 +export function exportCar(params) { + return request({ + url: 'car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..0a0ee34 --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,69 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +// 设备查询 +export function getDeviceInfoList(params) { + return request({ + url: 'car/busDeviceInfo/listPage', + method: 'get', + params + }) +} +// 设备详情查询 +export function getDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/detail', + method: 'get', + params: { + id: id + } + }) +} +// 添加设备 +export function addDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceInfo(params) { + return request({ + url: 'car/busDeviceInfo/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDeviceInfo(id) { + return request({ + url: 'car/busDeviceInfo/delete', + method: 'get', + params: { + busDeviceInfoId: id + } + }) +} +// 未关联车辆的设备列表 +export function listNoBind(id) { + return request({ + url: 'car/busDeviceInfo/listNoBind', + method: 'get', + params: { + carId: id + } + }) +} +// 批量导入 +export function batchImport(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'car/busDeviceInfo/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} diff --git a/src/api/dict.js b/src/api/dict.js new file mode 100644 index 0000000..48dbeeb --- /dev/null +++ b/src/api/dict.js @@ -0,0 +1,14 @@ +/** + * 字典接口 + */ +import request from '@/utils/request' + +// 获取字典值 +export function getDictCode(str) { + return request({ + url: 'dict/code/' + str, + method: 'get', + params: { + } + }) +} diff --git a/src/api/fenceInfo.js b/src/api/fenceInfo.js new file mode 100644 index 0000000..3a467dc --- /dev/null +++ b/src/api/fenceInfo.js @@ -0,0 +1,89 @@ +/** + * 电子围栏信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 电子围栏信息查询 +export function getFenceInfoList(params) { + return request({ + url: 'car/busFenceInfo/listPage', + method: 'get', + params + }) +} +// 电子围栏信息详情查询 +export function getFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增电子围栏基础信息 +export function addFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/add', + method: 'post', + params + }) +} +// 修改电子围栏信息 +export function updateFenceInfo(params) { + return request({ + url: 'car/busFenceInfo/update', + method: 'post', + params + }) +} +// 删除电子围栏信息 +export function delFenceInfo(id) { + return request({ + url: 'car/busFenceInfo/delete', + method: 'get', + params: { + busFenceInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busFenceInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busFenceInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busFenceInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存电子围栏 +export function addPath(data) { + return request({ + url: 'car/busFenceInfo/savePoint', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/api/mile.js b/src/api/mile.js new file mode 100644 index 0000000..c6a0e31 --- /dev/null +++ b/src/api/mile.js @@ -0,0 +1,21 @@ +/** + * 车辆里程统计接口 + */ + +// 按车辆统计 +import request from '@/utils/request' +export function staticsByCar(params) { + return request({ + url: 'car/busCarMile/staticsByCar', + method: 'get', + params + }) +} + +export function staticsByTime(params) { + return request({ + url: 'car/busCarMile/staticsByTime', + method: 'get', + params + }) +} diff --git a/src/api/overview.js b/src/api/overview.js new file mode 100644 index 0000000..f662534 --- /dev/null +++ b/src/api/overview.js @@ -0,0 +1,50 @@ +/** + * 总览接口 + */ + +// 车辆定位列表 +import request from '@/utils/request' +export function getOverviewList(params) { + return request({ + url: 'car/busCarPosition/listPage', + method: 'get', + params + }) +} +export function getOverviewAllList(params) { + return request({ + url: 'car/busCarPosition/list', + method: 'get', + params + }) +} +export function offlineCount(params) { + return request({ + url: 'car/busCarPosition/offlineCount', + method: 'get', + params + }) +} +export function track(id) { + return request({ + url: 'car/busCarPosition/track', + method: 'get', + params: { + carId: id + } + }) +} +export function trail(params) { + return request({ + url: 'car/busCarPosition/trace', + method: 'get', + params + }) +} +export function speedLine(params) { + return request({ + url: 'car/busCarPosition/speedLine', + method: 'get', + params + }) +} diff --git a/src/api/routeInfo.js b/src/api/routeInfo.js new file mode 100644 index 0000000..17594b1 --- /dev/null +++ b/src/api/routeInfo.js @@ -0,0 +1,89 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: 'car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: 'car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: 'car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: 'car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: 'car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: 'car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: 'car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/assets/global_images/car-alarm.png b/src/assets/global_images/car-alarm.png new file mode 100644 index 0000000..4128ec9 --- /dev/null +++ b/src/assets/global_images/car-alarm.png Binary files differ diff --git a/src/assets/global_images/car-offline.png b/src/assets/global_images/car-offline.png new file mode 100644 index 0000000..6a6fc19 --- /dev/null +++ b/src/assets/global_images/car-offline.png Binary files differ diff --git a/src/assets/global_images/car-online.png b/src/assets/global_images/car-online.png new file mode 100644 index 0000000..c79e4f7 --- /dev/null +++ b/src/assets/global_images/car-online.png Binary files differ diff --git a/src/assets/global_images/car-stop.png b/src/assets/global_images/car-stop.png new file mode 100644 index 0000000..77b125d --- /dev/null +++ b/src/assets/global_images/car-stop.png Binary files differ diff --git a/src/assets/global_images/car-timeout.png b/src/assets/global_images/car-timeout.png new file mode 100644 index 0000000..7f94bfa --- /dev/null +++ b/src/assets/global_images/car-timeout.png Binary files differ diff --git a/src/assets/global_images/car.png b/src/assets/global_images/car.png new file mode 100644 index 0000000..86d399b --- /dev/null +++ b/src/assets/global_images/car.png Binary files differ diff --git a/src/assets/global_images/delete.png b/src/assets/global_images/delete.png new file mode 100644 index 0000000..1192546 --- /dev/null +++ b/src/assets/global_images/delete.png Binary files differ diff --git a/src/assets/global_images/end.png b/src/assets/global_images/end.png new file mode 100644 index 0000000..140b5bc --- /dev/null +++ b/src/assets/global_images/end.png Binary files differ diff --git a/src/assets/global_images/start.png b/src/assets/global_images/start.png new file mode 100644 index 0000000..fd1ffb4 --- /dev/null +++ b/src/assets/global_images/start.png Binary files differ diff --git a/src/icons/svg/alarm2.svg b/src/icons/svg/alarm2.svg index f8bb020..a9fba5e 100644 --- a/src/icons/svg/alarm2.svg +++ b/src/icons/svg/alarm2.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/icons/svg/car.svg b/src/icons/svg/car.svg new file mode 100644 index 0000000..c8a8c6f --- /dev/null +++ b/src/icons/svg/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/fence.svg b/src/icons/svg/fence.svg new file mode 100644 index 0000000..497ee00 --- /dev/null +++ b/src/icons/svg/fence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/gps-fill.svg b/src/icons/svg/gps-fill.svg new file mode 100644 index 0000000..0eb88a3 --- /dev/null +++ b/src/icons/svg/gps-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-data.svg b/src/icons/svg/icon-data.svg index 4092647..f09469d 100644 --- a/src/icons/svg/icon-data.svg +++ b/src/icons/svg/icon-data.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/src/icons/svg/licheng.svg b/src/icons/svg/licheng.svg new file mode 100644 index 0000000..f1a4ace --- /dev/null +++ b/src/icons/svg/licheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/locate.svg b/src/icons/svg/locate.svg new file mode 100644 index 0000000..0e530ac --- /dev/null +++ b/src/icons/svg/locate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/route.svg b/src/icons/svg/route.svg new file mode 100644 index 0000000..b89e4d3 --- /dev/null +++ b/src/icons/svg/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/time.svg b/src/icons/svg/time.svg new file mode 100644 index 0000000..da8fdee --- /dev/null +++ b/src/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..e028254 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,6 +10,7 @@ import Layout from '@/layout/Layout' import { systemRouters } from './modules/system' import { exampleRouters } from './modules/example' +import { carRouters } from './modules/car' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -49,14 +50,14 @@ { path: '/', component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, + redirect: 'overviewlist', + name: 'Overview', + hidden: true, children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + path: 'overviewlist', + name: 'Overviewlist', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } }] } ] @@ -70,7 +71,7 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - ...exampleRouters, + ...carRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/car.js b/src/router/modules/car.js new file mode 100644 index 0000000..973a42b --- /dev/null +++ b/src/router/modules/car.js @@ -0,0 +1,185 @@ +/* Layout */ +import Layout from '@/layout/Layout' + +export const carRouters = [{ + path: 'overview', + component: Layout, + redirect: '/overviewlist', + name: 'Overview', + meta: { + title: '车辆定位监控', + icon: 'el-icon-position', // 图标 + permission: ['/overview']// 权限名称 + }, + children: [ + { + path: '/overviewlist', + name: 'OverviewList', + component: () => import('@/views/overview/listoverview'), + meta: { title: '车辆定位监控列表', icon: 'function', permission: ['/overview/list'], affix: true } + }, { + path: '/track', + name: 'Track', + hidden: true, + component: () => import('@/views/overview/track'), + meta: { title: '车辆实时位置追踪', icon: 'function', permission: ['/track'] } + }, + { + path: '/trail', + name: 'Trail', + hidden: true, + component: () => import('@/views/overview/trail'), + meta: { title: '车辆历史轨迹', icon: 'function', permission: ['/trail'] } + } + ] +}, { + path: 'carInfo', + component: Layout, + redirect: '/carinfolist', + name: 'CarInfo', + alwaysShow: true, + meta: { + title: '车辆信息管理', + icon: 'icon-config', // 图标 + permission: ['/carInfo']// 权限名称 + }, + children: [ + { + path: '/carinfolist', + name: 'CarInfoList', + component: () => import('@/views/carinfo/listCarInfo'), + meta: { title: '车辆基础信息', icon: 'function', permission: ['/carinfolist'] } + }, { + path: '/gpslist', + name: 'GpsList', + component: () => import('@/views/carinfo/listGpsDevice'), + meta: { title: 'GPS设备模块信息', icon: 'function', permission: ['/gpslist'] } + }] +}, { + path: 'mile', + component: Layout, + redirect: '/carmilelist', + name: 'mile', + alwaysShow: true, + meta: { + title: '车辆里程统计', + icon: 'icon-config', // 图标 + permission: ['/mile']// 权限名称 + }, + children: [ + { + path: '/carmilelist', + name: 'CarMileList', + component: () => import('@/views/mile/listCar'), + meta: { title: '按车辆统计', icon: 'function', permission: ['/carmile/list'] } + }, { + path: '/timemilelist', + name: 'TimeMileList', + component: () => import('@/views/mile/listTime'), + meta: { title: '按时间统计', icon: 'function', permission: ['/timemile/list'] } + }] +}, { + path: 'route', + component: Layout, + redirect: '/routelist', + name: 'Route', + meta: { + title: '路线规划管理', + icon: 'icon-config', // 图标 + permission: ['/route']// 权限名称 + }, + children: [ + { + path: '/route/list', + name: 'RouteList', + component: () => import('@/views/route/listRoute'), + meta: { title: '路线规划管理', icon: 'function', permission: ['/route/list'] } + }, { + path: '/route/add', + name: 'RouteAdd', + hidden: true, + component: () => import('@/views/route/addRoute'), + meta: { title: '新增规划路线', icon: 'function', permission: ['/route/add'] } + }, { + path: '/route/edit', + name: 'RouteEdit', + hidden: true, + component: () => import('@/views/route/editRoute'), + meta: { title: '编辑路线规划信息', icon: 'function', permission: ['/route/edit'] } + }, { + path: '/route/detail', + name: 'RouteDetail', + hidden: true, + component: () => import('@/views/route/detailRoute'), + meta: { title: '路线规划详情', icon: 'function', permission: ['/route/detail'] } + }] +}, { + path: 'fence', + component: Layout, + redirect: '/fencelist', + name: 'Fence', + meta: { + title: '车辆围栏管理', + icon: 'icon-config', // 图标 + permission: ['/fence']// 权限名称 + }, + children: [ + { + path: '/fence/list', + name: 'FenceList', + component: () => import('@/views/fence/listFence'), + meta: { title: '车辆围栏管理', icon: 'function', permission: ['/fence/list'] } + }, { + path: '/fence/add', + name: 'FenceAdd', + hidden: true, + component: () => import('@/views/fence/addFence'), + meta: { title: '新增电子围栏', icon: 'function', permission: ['/fence/add'] } + }, { + path: '/fence/edit', + name: 'FenceEdit', + hidden: true, + component: () => import('@/views/fence/editFence'), + meta: { title: '编辑电子围栏信息', icon: 'function', permission: ['/fence/edit'] } + }, { + path: '/fence/detail', + name: 'FenceDetail', + hidden: true, + component: () => import('@/views/fence/detailFence'), + meta: { title: '电子围栏详情', icon: 'function', permission: ['/fence/detail'] } + }] +}, { + path: 'caralarm', + component: Layout, + redirect: '/recordlist', + alwaysShow: true, + name: 'CarAlarm', + meta: { + title: '车辆违规管理', + icon: 'icon-config', // 图标 + permission: ['/caralarm']// 权限名称 + }, + children: [ + { + path: '/record/list', + name: 'RecordList', + component: () => import('@/views/alarm/listRecord'), + meta: { title: '违规记录查询', icon: 'function', permission: ['/record/list'] } + }, { + path: '/threshold/list', + name: 'ThresholdList', + component: () => import('@/views/alarm/listCarThreshold'), + meta: { title: '车辆阈值管理', icon: 'function', permission: ['/threshold/list'] } + }, { + path: '/data/list', + name: 'DataList', + component: () => import('@/views/alarm/listData'), + meta: { title: '违规数据统计', icon: 'function', permission: ['/data/list'] } + }, { + path: '/offline/list', + name: 'OfflineList', + component: () => import('@/views/alarm/listOffline'), + meta: { title: '车辆离线统计', icon: 'function', permission: ['/offline/list'] } + } + ] +}] diff --git a/src/utils/downloadUtils.js b/src/utils/downloadUtils.js new file mode 100644 index 0000000..6775b00 --- /dev/null +++ b/src/utils/downloadUtils.js @@ -0,0 +1,22 @@ +// 下载文件的公共方法 +export function downloadFile(file, fileName) { + const blob = new Blob([file]) + // IE及IE内核浏览器,ie10+ + if (window.navigator.msSaveBlob) { + try { + window.navigator.msSaveBlob(blob, fileName + '.xlsx') + } catch (e) { + console.log(e) + } + } else { // 其他浏览器 + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) // 创建下载的链接 + downloadElement.href = href + downloadElement.download = fileName + '.xlsx' // 下载后文件名 + document.body.appendChild(downloadElement) + downloadElement.click() // 点击下载 + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放blob对象 + } +} + diff --git a/src/views/alarm/detailRecord.vue b/src/views/alarm/detailRecord.vue new file mode 100644 index 0000000..2128fb0 --- /dev/null +++ b/src/views/alarm/detailRecord.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/alarm/editCarThreshold.vue b/src/views/alarm/editCarThreshold.vue new file mode 100644 index 0000000..18186e5 --- /dev/null +++ b/src/views/alarm/editCarThreshold.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/views/alarm/listCarThreshold.vue b/src/views/alarm/listCarThreshold.vue new file mode 100644 index 0000000..a102517 --- /dev/null +++ b/src/views/alarm/listCarThreshold.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/alarm/listData.vue b/src/views/alarm/listData.vue new file mode 100644 index 0000000..ea8ae5e --- /dev/null +++ b/src/views/alarm/listData.vue @@ -0,0 +1,301 @@ + + + + diff --git a/src/views/alarm/listOffline.vue b/src/views/alarm/listOffline.vue new file mode 100644 index 0000000..757dd30 --- /dev/null +++ b/src/views/alarm/listOffline.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/alarm/listRecord.vue b/src/views/alarm/listRecord.vue new file mode 100644 index 0000000..a992fa1 --- /dev/null +++ b/src/views/alarm/listRecord.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/carinfo/editCarInfo.vue b/src/views/carinfo/editCarInfo.vue new file mode 100644 index 0000000..5275a40 --- /dev/null +++ b/src/views/carinfo/editCarInfo.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/src/views/carinfo/editGpsDevice.vue b/src/views/carinfo/editGpsDevice.vue new file mode 100644 index 0000000..6e63ab0 --- /dev/null +++ b/src/views/carinfo/editGpsDevice.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/carinfo/listCarInfo.vue b/src/views/carinfo/listCarInfo.vue new file mode 100644 index 0000000..a20c0b1 --- /dev/null +++ b/src/views/carinfo/listCarInfo.vue @@ -0,0 +1,234 @@ + + + + diff --git a/src/views/carinfo/listGpsDevice.vue b/src/views/carinfo/listGpsDevice.vue new file mode 100644 index 0000000..a9338a6 --- /dev/null +++ b/src/views/carinfo/listGpsDevice.vue @@ -0,0 +1,263 @@ + + + + diff --git a/src/views/fence/addFence.vue b/src/views/fence/addFence.vue new file mode 100644 index 0000000..4401741 --- /dev/null +++ b/src/views/fence/addFence.vue @@ -0,0 +1,430 @@ + + + + diff --git a/src/views/fence/detailFence.vue b/src/views/fence/detailFence.vue new file mode 100644 index 0000000..4a06633 --- /dev/null +++ b/src/views/fence/detailFence.vue @@ -0,0 +1,335 @@ + + + + diff --git a/src/views/fence/editFence.vue b/src/views/fence/editFence.vue new file mode 100644 index 0000000..9bfbe11 --- /dev/null +++ b/src/views/fence/editFence.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/fence/listFence.vue b/src/views/fence/listFence.vue new file mode 100644 index 0000000..2bb6878 --- /dev/null +++ b/src/views/fence/listFence.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/mile/listCar.vue b/src/views/mile/listCar.vue new file mode 100644 index 0000000..e51915c --- /dev/null +++ b/src/views/mile/listCar.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/mile/listTime.vue b/src/views/mile/listTime.vue new file mode 100644 index 0000000..f4f8613 --- /dev/null +++ b/src/views/mile/listTime.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/views/overview/listoverview.vue b/src/views/overview/listoverview.vue new file mode 100644 index 0000000..4dee730 --- /dev/null +++ b/src/views/overview/listoverview.vue @@ -0,0 +1,582 @@ + + + + diff --git a/src/views/overview/track.vue b/src/views/overview/track.vue new file mode 100644 index 0000000..8d977b7 --- /dev/null +++ b/src/views/overview/track.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/overview/trail.vue b/src/views/overview/trail.vue new file mode 100644 index 0000000..ddbd191 --- /dev/null +++ b/src/views/overview/trail.vue @@ -0,0 +1,362 @@ + + + diff --git a/src/views/overview/trailStatic.vue b/src/views/overview/trailStatic.vue new file mode 100644 index 0000000..7f49888 --- /dev/null +++ b/src/views/overview/trailStatic.vue @@ -0,0 +1,131 @@ + + + + + + diff --git a/src/views/route/addRoute.vue b/src/views/route/addRoute.vue new file mode 100644 index 0000000..4997de5 --- /dev/null +++ b/src/views/route/addRoute.vue @@ -0,0 +1,440 @@ + + + + diff --git a/src/views/route/detailRoute.vue b/src/views/route/detailRoute.vue new file mode 100644 index 0000000..5501b36 --- /dev/null +++ b/src/views/route/detailRoute.vue @@ -0,0 +1,364 @@ + + + + diff --git a/src/views/route/editRoute.vue b/src/views/route/editRoute.vue new file mode 100644 index 0000000..6ce4730 --- /dev/null +++ b/src/views/route/editRoute.vue @@ -0,0 +1,495 @@ + + + + diff --git a/src/views/route/listRoute.vue b/src/views/route/listRoute.vue new file mode 100644 index 0000000..d40f63d --- /dev/null +++ b/src/views/route/listRoute.vue @@ -0,0 +1,221 @@ + + + + diff --git a/static/project.config.json b/static/project.config.json index cb1eb78..c66d2a1 100644 --- a/static/project.config.json +++ b/static/project.config.json @@ -1,7 +1,7 @@ { "title": "基础资源系统", "baseUrl": "http://111.198.10.15:11409/", - "mainPage": "http://111.198.10.15:11404/dcms/", + "mainPage": "", "singleSys": true, "city":"崇仁县", "mapUrl":"https://t0.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=216ee92889e17ab1b083fae665d522b8",