diff --git a/BaiduMapApi b/BaiduMapApi new file mode 160000 index 0000000..2e29dc1 --- /dev/null +++ b/BaiduMapApi @@ -0,0 +1 @@ +Subproject commit 2e29dc1fd8c6fdce3017f62e24e2133b44a793df diff --git a/pc-cattle-transportation/package.json b/pc-cattle-transportation/package.json index f407e92..a7604f2 100644 --- a/pc-cattle-transportation/package.json +++ b/pc-cattle-transportation/package.json @@ -47,7 +47,8 @@ "vue-use": "^0.2.0", "vue3-baidu-map": "^1.0.0", "vue3-json-viewer": "^2.2.2", - "vue3-print-nb": "^0.1.4" + "vue3-print-nb": "^0.1.4", + "xlsx": "^0.18.5" }, "devDependencies": { "@commitlint/cli": "^17.1.2", diff --git a/pc-cattle-transportation/src/api/abroad.js b/pc-cattle-transportation/src/api/abroad.js index 90c230a..fd66f32 100644 --- a/pc-cattle-transportation/src/api/abroad.js +++ b/pc-cattle-transportation/src/api/abroad.js @@ -48,6 +48,15 @@ export function inspectionList(data) { data, }); } + +// 查询百度鹰眼轨迹与停留点 +export function getYingyanTrack(data) { + return request({ + url: '/delivery/yingyan/track', + method: 'POST', + data, + }); +} // 详情 export function waybillDetail(id) { return request({ diff --git a/pc-cattle-transportation/src/api/shipping.js b/pc-cattle-transportation/src/api/shipping.js index 96ebfc5..8230717 100644 --- a/pc-cattle-transportation/src/api/shipping.js +++ b/pc-cattle-transportation/src/api/shipping.js @@ -265,6 +265,15 @@ export function orderGetDetail(id) { }); } +// 批量导入订单 +export function orderBatchImport(data) { + return request({ + url: '/order/batchImport', + method: 'POST', + data, + }); +} + // ==================== 运送清单管理新增 API ==================== // 逻辑删除运送清单 diff --git a/pc-cattle-transportation/src/components/ImageUpload/index.vue b/pc-cattle-transportation/src/components/ImageUpload/index.vue index 028ba19..d30890c 100644 --- a/pc-cattle-transportation/src/components/ImageUpload/index.vue +++ b/pc-cattle-transportation/src/components/ImageUpload/index.vue @@ -109,7 +109,7 @@ export default defineComponent({ maxFileSize: { // 新增最大文件大小属性 type: Number, - default: 2 * 1024 * 1024, // 默认值为2MB + default: 10 * 1024 * 1024, // 默认值为10MB required: false, }, }, @@ -188,7 +188,7 @@ export default defineComponent({ if (acceptType.value == 'video/*') { dialogVisible.value = true; } - // // }, + }, imgPreviewClose: () => { showImageViewer.value = false; }, diff --git a/pc-cattle-transportation/src/components/common/searchCustom/index.vue b/pc-cattle-transportation/src/components/common/searchCustom/index.vue index 72aaf81..1c9f3a2 100644 --- a/pc-cattle-transportation/src/components/common/searchCustom/index.vue +++ b/pc-cattle-transportation/src/components/common/searchCustom/index.vue @@ -308,4 +308,31 @@ el-form-item--large asterisk-left .top-title { ::v-deep(.el-form-item) { width: 100%; } + +/* 修复标签与输入框的垂直居中与水平对齐问题 */ +.top-screen :deep(.el-form-item) { + display: flex; + align-items: center; +} + +.top-screen :deep(.el-form-item__label) { + display: flex; + align-items: center; + height: 40px; /* 与 Element Plus large 尺寸一致 */ + line-height: 40px; + padding-right: 8px; + box-sizing: border-box; + white-space: nowrap; +} + +.top-screen :deep(.el-input), +.top-screen :deep(.el-select), +.top-screen :deep(.el-date-editor), +.top-screen :deep(.el-cascader) { + height: 40px; +} + +.top-screen :deep(.el-input__wrapper) { + min-height: 40px; +} diff --git a/pc-cattle-transportation/src/store/deliveryForm.ts b/pc-cattle-transportation/src/store/deliveryForm.ts new file mode 100644 index 0000000..5dc28bf --- /dev/null +++ b/pc-cattle-transportation/src/store/deliveryForm.ts @@ -0,0 +1,262 @@ +import { defineStore } from 'pinia'; + +/** + * 运送清单表单数据缓存 Store + * 支持新增模式和编辑模式的表单数据缓存 + */ +export const useDeliveryFormStore = defineStore('deliveryForm', { + state: () => { + return { + // 新增模式的缓存数据 + newFormData: { + orderId: null as number | null, + shipper: null as number | null, + buyer: null as number | null, + plateNumber: null as string | null, + driverId: null as number | null, + driverPhone: '' as string, + serverId: null as number | null, + serverDeviceId: '' as string, + eartagIds: [] as number[], + collarIds: [] as number[], + eartagDeviceIds: [] as string[], + collarDeviceIds: [] as string[], + estimatedDepartureTime: '' as string, + estimatedArrivalTime: '' as string, + startLocation: '' as string, + endLocation: '' as string, + startLat: '' as string, + startLon: '' as string, + endLat: '' as string, + endLon: '' as string, + cattleCount: 1 as number, + quarantineCertNo: '' as string, + remark: '' as string, + emptyWeight: null as number | null, + entruckWeight: null as number | null, + landingEntruckWeight: null as number | null, + quarantineTickeyUrl: '' as string, + poundListImg: '' as string, + emptyVehicleFrontPhoto: '' as string, + loadedVehicleFrontPhoto: '' as string, + loadedVehicleWeightPhoto: '' as string, + driverIdCardPhoto: '' as string, + destinationPoundListImg: '' as string, + destinationVehicleFrontPhoto: '' as string, + entruckWeightVideo: '' as string, + emptyWeightVideo: '' as string, + cattleLoadingVideo: '' as string, + controlSlotVideo: '' as string, + cattleLoadingCircleVideo: '' as string, + unloadCattleVideo: '' as string, + destinationWeightVideo: '' as string, + }, + // 编辑模式的缓存数据(key为editId) + editFormData: {} as Record, + }; + }, + persist: { + enabled: true, + strategies: [ + { + key: 'deliveryFormCache', + storage: localStorage, + }, + ], + }, + actions: { + /** + * 保存新增模式表单数据 + */ + saveNewFormData(data: Partial) { + // 深度合并,确保数组和对象正确更新 + Object.keys(data).forEach(key => { + const value = data[key]; + if (Array.isArray(value)) { + // 数组类型,创建新数组 + this.newFormData[key] = [...value] as any; + } else { + // 其他类型,直接赋值 + this.newFormData[key] = value as any; + } + }); + }, + + /** + * 获取新增模式表单数据 + */ + getNewFormData() { + return { ...this.newFormData }; + }, + + /** + * 清除新增模式表单数据 + */ + clearNewFormData() { + this.newFormData = { + orderId: null, + shipper: null, + buyer: null, + plateNumber: null, + driverId: null, + driverPhone: '', + serverId: null, + serverDeviceId: '', + eartagIds: [], + collarIds: [], + eartagDeviceIds: [], + collarDeviceIds: [], + estimatedDepartureTime: '', + estimatedArrivalTime: '', + startLocation: '', + endLocation: '', + startLat: '', + startLon: '', + endLat: '', + endLon: '', + cattleCount: 1, + quarantineCertNo: '', + remark: '', + emptyWeight: null, + entruckWeight: null, + landingEntruckWeight: null, + quarantineTickeyUrl: '', + poundListImg: '', + emptyVehicleFrontPhoto: '', + loadedVehicleFrontPhoto: '', + loadedVehicleWeightPhoto: '', + driverIdCardPhoto: '', + destinationPoundListImg: '', + destinationVehicleFrontPhoto: '', + entruckWeightVideo: '', + emptyWeightVideo: '', + cattleLoadingVideo: '', + controlSlotVideo: '', + cattleLoadingCircleVideo: '', + unloadCattleVideo: '', + destinationWeightVideo: '', + }; + }, + + /** + * 保存编辑模式表单数据 + */ + saveEditFormData(editId: number, data: Partial) { + if (!this.editFormData[editId]) { + this.editFormData[editId] = { + editId, + orderId: null, + shipper: null, + buyer: null, + plateNumber: null, + driverId: null, + driverPhone: '', + serverId: null, + serverDeviceId: '', + eartagIds: [], + collarIds: [], + eartagDeviceIds: [], + collarDeviceIds: [], + estimatedDepartureTime: '', + estimatedArrivalTime: '', + startLocation: '', + endLocation: '', + startLat: '', + startLon: '', + endLat: '', + endLon: '', + cattleCount: 1, + quarantineCertNo: '', + remark: '', + emptyWeight: null, + entruckWeight: null, + landingEntruckWeight: null, + quarantineTickeyUrl: '', + poundListImg: '', + emptyVehicleFrontPhoto: '', + loadedVehicleFrontPhoto: '', + loadedVehicleWeightPhoto: '', + driverIdCardPhoto: '', + destinationPoundListImg: '', + destinationVehicleFrontPhoto: '', + entruckWeightVideo: '', + emptyWeightVideo: '', + cattleLoadingVideo: '', + controlSlotVideo: '', + cattleLoadingCircleVideo: '', + unloadCattleVideo: '', + destinationWeightVideo: '', + }; + } + this.editFormData[editId] = { ...this.editFormData[editId], ...data, editId }; + }, + + /** + * 获取编辑模式表单数据 + */ + getEditFormData(editId: number) { + return this.editFormData[editId] ? { ...this.editFormData[editId] } : null; + }, + + /** + * 清除指定编辑模式表单数据 + */ + clearEditFormData(editId: number) { + if (this.editFormData[editId]) { + delete this.editFormData[editId]; + } + }, + + /** + * 清除所有缓存 + */ + clearAllCache() { + this.clearNewFormData(); + this.editFormData = {}; + }, + }, +}); + diff --git a/pc-cattle-transportation/src/views/earlywarning/list.vue b/pc-cattle-transportation/src/views/earlywarning/list.vue index 3ccbeba..870d3e2 100644 --- a/pc-cattle-transportation/src/views/earlywarning/list.vue +++ b/pc-cattle-transportation/src/views/earlywarning/list.vue @@ -58,12 +58,36 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + +
+ +
+ + {{ isPlaying ? '暂停' : '播放' }} + + + 重置 + + + 轨迹点数:{{ trackPath.length }} + + + 状态:{{ getDeliveryStatusText(deliveryStatus) }} + +
+ + +
+ + +
+ +
+ +
+ + {{ yingyanMeta.entityName }} + {{ formatTimestamp(yingyanMeta.startTime) }} + {{ formatTimestamp(yingyanMeta.endTime) }} + +
+ +
+

停留点分析(15分钟)

+ + + + + + + + + + + + + + +
+
+ 暂无满足 15 分钟的停留点数据 +
+
+
+ + +
diff --git a/pc-cattle-transportation/src/views/shipping/loadingOrder.vue b/pc-cattle-transportation/src/views/shipping/loadingOrder.vue index 9abe4ea..7782b15 100644 --- a/pc-cattle-transportation/src/views/shipping/loadingOrder.vue +++ b/pc-cattle-transportation/src/views/shipping/loadingOrder.vue @@ -13,6 +13,23 @@ > 新增运送清单 + + + 导入数据 + + + + + @@ -58,7 +75,13 @@
暂无数据
- + @@ -68,14 +91,19 @@ - + diff --git a/pc-cattle-transportation/src/views/userManage/driverDialog.vue b/pc-cattle-transportation/src/views/userManage/driverDialog.vue index 1b8ad55..1e9dc53 100644 --- a/pc-cattle-transportation/src/views/userManage/driverDialog.vue +++ b/pc-cattle-transportation/src/views/userManage/driverDialog.vue @@ -137,15 +137,15 @@ const handleRemove = (file, fileList, type) => { const beforeAvatarUpload = (file) => { const isImage = file.type.startsWith('image/'); - const isLt2M = file.size / 1024 / 1024 < 2; + const isLt10M = file.size / 1024 / 1024 < 10; if (!isImage) { ElMessage.error('上传文件只能是图片格式!'); } - if (!isLt2M) { - ElMessage.error('上传图片大小不能超过 2MB!'); + if (!isLt10M) { + ElMessage.error('上传图片大小不能超过 10MB!'); } - return isImage && isLt2M; + return isImage && isLt10M; }; const handleExceed = (number) => { diff --git a/pc-cattle-transportation/src/views/userManage/user.vue b/pc-cattle-transportation/src/views/userManage/user.vue index b33327f..009e016 100644 --- a/pc-cattle-transportation/src/views/userManage/user.vue +++ b/pc-cattle-transportation/src/views/userManage/user.vue @@ -1,8 +1,10 @@