From 3154f371cf7c5ef491fe202fa48f61ba85e3ecde Mon Sep 17 00:00:00 2001 From: liejiu946 Date: Wed, 18 Mar 2026 18:56:16 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E5=A2=9E=E5=8A=A0=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/frobot/map/station/station.js | 9 +- src/api/frobot/task/task.js | 10 +- src/i18n/langs/Vietnamese.js | 4 +- src/i18n/langs/chinese.js | 4 +- src/i18n/langs/english.js | 4 +- src/i18n/langs/hotel/en.js | 58 +++ src/i18n/langs/hotel/vi.js | 58 +++ src/i18n/langs/hotel/zh.js | 58 +++ src/views/acs/task/index.vue | 25 +- src/views/frobot/hotel/index.vue | 575 ++++++++++++++++++++++++++ 10 files changed, 799 insertions(+), 6 deletions(-) create mode 100644 src/i18n/langs/hotel/en.js create mode 100644 src/i18n/langs/hotel/vi.js create mode 100644 src/i18n/langs/hotel/zh.js create mode 100644 src/views/frobot/hotel/index.vue diff --git a/src/api/frobot/map/station/station.js b/src/api/frobot/map/station/station.js index d9226a7..b28081a 100644 --- a/src/api/frobot/map/station/station.js +++ b/src/api/frobot/map/station/station.js @@ -7,4 +7,11 @@ export function queryAllStations() { }) } -export default { queryAllStations } +export function queryAllStationWithTaskStatus() { + return request({ + url: '/optionManager/queryAllStationWithTaskStatus', + method: 'get' + }) +} + +export default { queryAllStations, queryAllStationWithTaskStatus } diff --git a/src/api/frobot/task/task.js b/src/api/frobot/task/task.js index 87a8d9d..913d094 100644 --- a/src/api/frobot/task/task.js +++ b/src/api/frobot/task/task.js @@ -41,4 +41,12 @@ export function cancelTask(taskCode) { }) } -export default { createTask, queryCurrentTaskInfo, queryTask, cancelTask } +export function oneClickOperation(params) { + return request({ + url: '/managerTask/oneClickOperation', + method: 'post', + data: params + }) +} + +export default { createTask, queryCurrentTaskInfo, queryTask, cancelTask, oneClickOperation } diff --git a/src/i18n/langs/Vietnamese.js b/src/i18n/langs/Vietnamese.js index 10bf657..45d0732 100644 --- a/src/i18n/langs/Vietnamese.js +++ b/src/i18n/langs/Vietnamese.js @@ -42,6 +42,7 @@ import dict from './dict/vi' import angle from './angle/in' import regional from './regional/in' import stage from './stage/in' +import hotel from './hotel/vi' export default { ...viLocale, @@ -88,5 +89,6 @@ export default { ...dict, ...angle, ...regional, - ...stage + ...stage, + ...hotel } diff --git a/src/i18n/langs/chinese.js b/src/i18n/langs/chinese.js index 89294a5..f2373d8 100644 --- a/src/i18n/langs/chinese.js +++ b/src/i18n/langs/chinese.js @@ -46,6 +46,7 @@ import qrcode from './qrcode/zh' import error from './error/zh' import log from './log/zh' import frobot_vehicle from './vehicle/zh' +import hotel from './hotel/zh' export default { ...zhLocale, @@ -95,6 +96,7 @@ export default { ...qrcode, ...error, ...log, - ...frobot_vehicle + ...frobot_vehicle, + ...hotel } diff --git a/src/i18n/langs/english.js b/src/i18n/langs/english.js index 770d399..99103c3 100644 --- a/src/i18n/langs/english.js +++ b/src/i18n/langs/english.js @@ -46,6 +46,7 @@ import qrcode from './qrcode/en' import error from './error/en' import log from './log/en' import frobot_vehicle from './vehicle/en' +import hotel from './hotel/en' export default { ...enLocale, @@ -95,6 +96,7 @@ export default { ...qrcode, ...error, ...log, - ...frobot_vehicle + ...frobot_vehicle, + ...hotel } diff --git a/src/i18n/langs/hotel/en.js b/src/i18n/langs/hotel/en.js new file mode 100644 index 0000000..04b5b22 --- /dev/null +++ b/src/i18n/langs/hotel/en.js @@ -0,0 +1,58 @@ +export default { + 'hotel': { + 'title': 'Operation Console', + 'refresh': 'Refresh', + 'last_update': 'Last Update', + 'legend': { + 'idle': 'Idle', + 'busy': 'In Task' + }, + 'status': { + 'idle': 'Idle', + 'running': 'Running', + 'arrived': 'Arrived', + 'dispatchable': 'Dispatchable' + }, + 'create': { + 'title': 'Dispatch Task', + 'target_room': 'Target Room', + 'task_type': 'Task Type', + 'vehicle_number': 'Vehicle No.', + 'vehicle_placeholder': 'Optional, specify vehicle', + 'priority': 'Priority', + 'priority_placeholder': 'Optional', + 'cancel': 'Cancel', + 'confirm': 'Confirm Dispatch', + 'success': 'Task dispatched to room {room} successfully', + 'failed': 'Task dispatch failed', + 'failed_retry': 'Task dispatch failed, please try again', + 'type_required': 'Please select task type', + 'type_placeholder': 'Please select task type' + }, + 'cancel': { + 'title': 'Cancel Task', + 'room': 'Room', + 'task_code': 'Task Code', + 'task_type': 'Task Type', + 'vehicle': 'Vehicle No.', + 'status': 'Status', + 'warning': 'Confirm cancellation? This action cannot be undone.', + 'close': 'Close', + 'confirm': 'Confirm Cancel', + 'success': 'Task cancelled', + 'failed': 'Cancel failed, please try again' + }, + 'go_home': { + 'title': 'Go Home', + 'vehicle_number': 'Vehicle No.', + 'vehicle_placeholder': 'Please select vehicle', + 'vehicle_required': 'Please select vehicle', + 'cancel': 'Cancel', + 'confirm': 'Confirm', + 'success': 'Go Home command sent to vehicle {vehicle}', + 'failed': 'Go Home command failed, please try again' + }, + 'empty': 'No room data available', + 'query_failed': 'Failed to query room status, please check network' + } +} diff --git a/src/i18n/langs/hotel/vi.js b/src/i18n/langs/hotel/vi.js new file mode 100644 index 0000000..98fc8be --- /dev/null +++ b/src/i18n/langs/hotel/vi.js @@ -0,0 +1,58 @@ +export default { + 'hotel': { + 'title': 'Bảng Điều Hành', + 'refresh': 'Làm mới', + 'last_update': 'Cập nhật lần cuối', + 'legend': { + 'idle': 'Rảnh', + 'busy': 'Có nhiệm vụ' + }, + 'status': { + 'idle': 'Rảnh', + 'running': 'Đang chạy', + 'arrived': 'Đã đến', + 'dispatchable': 'Có thể giao' + }, + 'create': { + 'title': 'Giao Nhiệm Vụ', + 'target_room': 'Phòng đích', + 'task_type': 'Loại nhiệm vụ', + 'vehicle_number': 'Số xe', + 'vehicle_placeholder': 'Tùy chọn, chỉ định xe', + 'priority': 'Ưu tiên', + 'priority_placeholder': 'Tùy chọn', + 'cancel': 'Hủy', + 'confirm': 'Xác nhận giao', + 'success': 'Nhiệm vụ đã giao đến phòng {room} thành công', + 'failed': 'Giao nhiệm vụ thất bại', + 'failed_retry': 'Giao nhiệm vụ thất bại, vui lòng thử lại', + 'type_required': 'Vui lòng chọn loại nhiệm vụ', + 'type_placeholder': 'Vui lòng chọn loại nhiệm vụ' + }, + 'cancel': { + 'title': 'Hủy Nhiệm Vụ', + 'room': 'Phòng', + 'task_code': 'Mã nhiệm vụ', + 'task_type': 'Loại nhiệm vụ', + 'vehicle': 'Số xe', + 'status': 'Trạng thái', + 'warning': 'Xác nhận hủy nhiệm vụ? Hành động này không thể hoàn tác.', + 'close': 'Đóng', + 'confirm': 'Xác nhận hủy', + 'success': 'Nhiệm vụ đã hủy', + 'failed': 'Hủy thất bại, vui lòng thử lại' + }, + 'go_home': { + 'title': 'Go Home', + 'vehicle_number': 'Số xe', + 'vehicle_placeholder': 'Vui lòng chọn xe', + 'vehicle_required': 'Vui lòng chọn xe', + 'cancel': 'Hủy', + 'confirm': 'Xác nhận', + 'success': 'Lệnh Go Home đã gửi đến xe {vehicle}', + 'failed': 'Lệnh Go Home thất bại, vui lòng thử lại' + }, + 'empty': 'Không có dữ liệu phòng', + 'query_failed': 'Truy vấn trạng thái phòng thất bại, kiểm tra mạng' + } +} diff --git a/src/i18n/langs/hotel/zh.js b/src/i18n/langs/hotel/zh.js new file mode 100644 index 0000000..4c9375b --- /dev/null +++ b/src/i18n/langs/hotel/zh.js @@ -0,0 +1,58 @@ +export default { + 'hotel': { + 'title': '操作台', + 'refresh': '刷新', + 'last_update': '最后更新', + 'legend': { + 'idle': '空闲', + 'busy': '有任务' + }, + 'status': { + 'idle': '空闲', + 'running': '执行中', + 'arrived': '已到达', + 'dispatchable': '可下发' + }, + 'create': { + 'title': '下发任务', + 'target_room': '目标房间', + 'task_type': '任务类型', + 'vehicle_number': '车号', + 'vehicle_placeholder': '可选,指定车号', + 'priority': '优先级', + 'priority_placeholder': '可选', + 'cancel': '取 消', + 'confirm': '确认下发', + 'success': '任务已成功下发到 {room} 房间', + 'failed': '任务下发失败', + 'failed_retry': '任务下发失败,请重试', + 'type_required': '请选择任务类型', + 'type_placeholder': '请选择任务类型' + }, + 'cancel': { + 'title': '取消任务', + 'room': '房间', + 'task_code': '任务编号', + 'task_type': '任务类型', + 'vehicle': '执行车号', + 'status': '任务状态', + 'warning': '确认取消该任务吗?此操作不可撤销。', + 'close': '关 闭', + 'confirm': '确认取消', + 'success': '任务已取消', + 'failed': '取消任务失败,请重试' + }, + 'go_home': { + 'title': 'Go Home', + 'vehicle_number': '车号', + 'vehicle_placeholder': '请选择车号', + 'vehicle_required': '请选择车号', + 'cancel': '取 消', + 'confirm': '确认执行', + 'success': '车辆 {vehicle} Go Home 指令已下发', + 'failed': 'Go Home 指令下发失败,请重试' + }, + 'empty': '暂无房间数据', + 'query_failed': '查询房间状态失败,请检查网络' + } +} diff --git a/src/views/acs/task/index.vue b/src/views/acs/task/index.vue index c6b9482..4b8a144 100644 --- a/src/views/acs/task/index.vue +++ b/src/views/acs/task/index.vue @@ -319,6 +319,30 @@ export default { }, methods: { openCreate() { + this.isDisabled = false + this.saving = false + this.form = { + id: null, + task_code: null, + destinations: null, + type: '', + status: '', + vehicleReportStatus: null, + arrive_waiting_time: 1, + priority: null, + vehicle_number: null, + processingVehicle: null, + isPause: null, + remark: null, + source: null, + create_by: null, + create_time: null, + update_time: 'normal', + update_by: '21' + } + this.$nextTick(() => { + if (this.$refs.form) this.$refs.form.resetFields() + }) this.formDia = true }, toQuery() { @@ -343,7 +367,6 @@ export default { this.saving = true frobot_task.createTask(this.form).then(() => { this.formDia = false - this.isDisabled = true this.$message.success(this.$t('auto.common.add_msg')) this.fetchData() }).catch((err) => { diff --git a/src/views/frobot/hotel/index.vue b/src/views/frobot/hotel/index.vue new file mode 100644 index 0000000..39e6f06 --- /dev/null +++ b/src/views/frobot/hotel/index.vue @@ -0,0 +1,575 @@ + + + + +