fix(@vben/web-antd): 修复工单详情页操作接口错误
- 取消/升级优先级弹窗补传 orderType,修复无法识别工单类型的问题 - 新增非待分配状态下的"转派"入口(QUEUED/DISPATCHED/CONFIRMED/ARRIVED) - 语音提醒从 IoT 原生接口改为 /ops/clean/device/notify Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,7 @@ import { IconifyIcon } from '@vben/icons';
|
||||
|
||||
import { Button, message } from 'ant-design-vue';
|
||||
|
||||
import { sendDeviceMessage } from '#/api/iot/device/device';
|
||||
import { manualCompleteOrder } from '#/api/ops/cleaning';
|
||||
import { manualCompleteOrder, sendDeviceNotify } from '#/api/ops/cleaning';
|
||||
|
||||
defineOptions({ name: 'CleaningActions' });
|
||||
|
||||
@@ -21,10 +20,10 @@ const emit = defineEmits<{
|
||||
async function handleVoiceNotify() {
|
||||
if (!props.order.assigneeId) return;
|
||||
try {
|
||||
await sendDeviceMessage({
|
||||
deviceId: props.order.assigneeId,
|
||||
method: 'voice.broadcast',
|
||||
params: { content: `请注意:${props.order.title}` },
|
||||
await sendDeviceNotify({
|
||||
badgeId: props.order.assigneeId,
|
||||
type: 'VOICE' as const,
|
||||
content: `请注意:${props.order.title}`,
|
||||
});
|
||||
message.success('语音提醒已发送');
|
||||
} catch {
|
||||
|
||||
@@ -564,6 +564,7 @@ function handleUpgrade() {
|
||||
orderId: order.value.id,
|
||||
orderCode: order.value.orderCode,
|
||||
currentPriority: order.value.priority,
|
||||
orderType: order.value.orderType,
|
||||
})
|
||||
.open();
|
||||
}
|
||||
@@ -573,6 +574,7 @@ function handleCancel() {
|
||||
orderId: order.value.id,
|
||||
orderCode: order.value.orderCode,
|
||||
title: order.value.title,
|
||||
orderType: order.value.orderType,
|
||||
})
|
||||
.open();
|
||||
}
|
||||
@@ -753,6 +755,14 @@ onUnmounted(stopPolling);
|
||||
<IconifyIcon icon="solar:user-plus-bold-duotone" class="mr-1" />
|
||||
分配执行人
|
||||
</Button>
|
||||
<Button
|
||||
v-if="['QUEUED', 'DISPATCHED', 'CONFIRMED', 'ARRIVED'].includes(order.status)"
|
||||
size="small"
|
||||
@click="handleAssign"
|
||||
>
|
||||
<IconifyIcon icon="solar:user-plus-bold-duotone" class="mr-1" />
|
||||
转派
|
||||
</Button>
|
||||
<CleaningActions
|
||||
v-if="isCleanOrder"
|
||||
:order="order"
|
||||
|
||||
Reference in New Issue
Block a user