feat(shipping-notice): 新增发货批次和任务管理功能,支持批次创建与任务处理
This commit is contained in:
1 parent
457f0f4e5e
commit
634dee4b81
81 files changed
+9088
-3625
No files matched your search
@@ -13,6 +13,7 @@ export interface UseChatRouteSyncOptions {
|
||||
currentAgentId: ComputedRef<number>;
|
||||
presetQuestion: ComputedRef<string>;
|
||||
shippingTaskIdFromQuery: ComputedRef<string | null>;
|
||||
shippingBatchNoFromQuery?: ComputedRef<string | null>;
|
||||
isShippingNoticeAgent: ComputedRef<boolean>;
|
||||
resetChatStateForAgentChange: () => void;
|
||||
cancelVoiceInput: () => void;
|
||||
@@ -38,6 +39,7 @@ export function useChatRouteSync(options: UseChatRouteSyncOptions) {
|
||||
currentAgentId,
|
||||
presetQuestion,
|
||||
shippingTaskIdFromQuery,
|
||||
shippingBatchNoFromQuery,
|
||||
resetChatStateForAgentChange,
|
||||
cancelVoiceInput,
|
||||
syncCurrentUserProfile,
|
||||
@@ -99,7 +101,7 @@ export function useChatRouteSync(options: UseChatRouteSyncOptions) {
|
||||
if (convId) {
|
||||
await loadConversation(convId, { force: true });
|
||||
if (syncToken !== routeSyncToken) return;
|
||||
} else if (shippingTaskIdFromQuery.value) {
|
||||
} else if (shippingTaskIdFromQuery.value || shippingBatchNoFromQuery?.value) {
|
||||
await resumeShippingTaskFromQuery();
|
||||
if (syncToken !== routeSyncToken) return;
|
||||
}
|
||||
@@ -120,13 +122,17 @@ export function useChatRouteSync(options: UseChatRouteSyncOptions) {
|
||||
});
|
||||
|
||||
watch(
|
||||
() => [route.params.agentId, route.query.conversation_id, route.query.preset, route.query.task_id],
|
||||
async ([nextAgentId, nextConversationId, nextPreset, nextTaskId], [prevAgentId, prevConversationId, prevPreset, prevTaskId]) => {
|
||||
() => [route.params.agentId, route.query.conversation_id, route.query.preset, route.query.task_id, route.query.batch_no],
|
||||
async (
|
||||
[nextAgentId, nextConversationId, nextPreset, nextTaskId, nextBatchNo],
|
||||
[prevAgentId, prevConversationId, prevPreset, prevTaskId, prevBatchNo],
|
||||
) => {
|
||||
if (
|
||||
nextAgentId === prevAgentId
|
||||
&& nextConversationId === prevConversationId
|
||||
&& nextPreset === prevPreset
|
||||
&& nextTaskId === prevTaskId
|
||||
&& nextBatchNo === prevBatchNo
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -135,6 +141,7 @@ export function useChatRouteSync(options: UseChatRouteSyncOptions) {
|
||||
nextAgentId === prevAgentId
|
||||
&& nextPreset === prevPreset
|
||||
&& nextTaskId === prevTaskId
|
||||
&& nextBatchNo === prevBatchNo
|
||||
&& nextConversationId !== prevConversationId
|
||||
) {
|
||||
if (typeof nextConversationId === 'string' && nextConversationId) {
|
||||
|
||||
Reference in new issue
Block a user