refactor: 重命名订单大厅路由与目录 board → hall,匹配数据库菜单路径
Some checks failed
Build and Deploy TenantUI / build-and-deploy (push) Failing after 27s
Some checks failed
Build and Deploy TenantUI / build-and-deploy (push) Failing after 27s
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { BoardColumnKey } from '../types';
|
||||
|
||||
import type { OrderBoardCard } from '#/api/order-board';
|
||||
import type { OrderBoardCard } from '#/api/order-hall';
|
||||
|
||||
import BoardOrderCard from './BoardOrderCard.vue';
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
<script setup lang="ts">
|
||||
import type { BoardColumnKey } from '../types';
|
||||
|
||||
import type { OrderBoardCard } from '#/api/order-board';
|
||||
import type { OrderBoardCard } from '#/api/order-hall';
|
||||
|
||||
import { CHANNEL_TAG_COLORS } from '../composables/order-board-page/constants';
|
||||
import { CHANNEL_TAG_COLORS } from '../composables/order-hall-page/constants';
|
||||
import {
|
||||
channelText,
|
||||
deliveryTypeText,
|
||||
elapsedMinutes,
|
||||
formatAmount,
|
||||
formatTime,
|
||||
} from '../composables/order-board-page/helpers';
|
||||
} from '../composables/order-hall-page/helpers';
|
||||
|
||||
const { card, columnKey } = defineProps<{
|
||||
card: OrderBoardCard;
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
completePreparationApi,
|
||||
confirmDeliveryApi,
|
||||
rejectOrderApi,
|
||||
} from '#/api/order-board';
|
||||
} from '#/api/order-hall';
|
||||
|
||||
/** 卡片操作动作选项。 */
|
||||
interface CardActionsOptions {
|
||||
@@ -4,7 +4,7 @@
|
||||
import type { BoardChannelFilter, BoardColumnKey } from '../../types';
|
||||
|
||||
/** 看板列定义。 */
|
||||
export const BOARD_COLUMNS: {
|
||||
export const HALL_COLUMNS: {
|
||||
colorClass: string;
|
||||
key: BoardColumnKey;
|
||||
title: string;
|
||||
@@ -3,19 +3,19 @@
|
||||
*/
|
||||
import type { Ref } from 'vue';
|
||||
|
||||
import type { OrderBoardPageState } from '../../types';
|
||||
import type { OrderHallPageState } from '../../types';
|
||||
|
||||
import type { OrderBoardCard } from '#/api/order-board';
|
||||
import type { OrderBoardCard } from '#/api/order-hall';
|
||||
|
||||
import {
|
||||
getOrderBoardApi,
|
||||
getOrderBoardStatsApi,
|
||||
getPendingSinceApi,
|
||||
} from '#/api/order-board';
|
||||
} from '#/api/order-hall';
|
||||
|
||||
/** 数据加载动作选项。 */
|
||||
interface DataActionsOptions {
|
||||
state: OrderBoardPageState;
|
||||
state: OrderHallPageState;
|
||||
statsRef: Ref<{
|
||||
completedCount: number;
|
||||
deliveringCount: number;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type {
|
||||
NewOrderPayload,
|
||||
OrderBoardPageState,
|
||||
OrderHallPageState,
|
||||
OrderStatusChangedPayload,
|
||||
OrderUrgedPayload,
|
||||
} from '../../types';
|
||||
@@ -8,13 +8,13 @@ import type {
|
||||
/**
|
||||
* 文件职责:订单大厅 SignalR 连接与事件处理。
|
||||
*/
|
||||
import type { OrderBoardCard } from '#/api/order-board';
|
||||
import type { OrderBoardCard } from '#/api/order-hall';
|
||||
|
||||
import { useSignalR } from '#/hooks/useSignalR';
|
||||
|
||||
/** SignalR 动作选项。 */
|
||||
interface SignalRActionsOptions {
|
||||
state: OrderBoardPageState;
|
||||
state: OrderHallPageState;
|
||||
onNewOrder?: () => void;
|
||||
onUrge?: () => void;
|
||||
catchUpSince: (since: Date) => Promise<OrderBoardCard[]>;
|
||||
@@ -1,19 +1,19 @@
|
||||
import type { OrderBoardPageState } from '../types';
|
||||
import type { OrderHallPageState } from '../types';
|
||||
|
||||
/**
|
||||
* 文件职责:订单大厅页面编排器,组合所有子动作模块。
|
||||
*/
|
||||
import { onMounted, onUnmounted, reactive, ref, watch } from 'vue';
|
||||
|
||||
import { createCardActions } from './order-board-page/card-actions';
|
||||
import { createDataActions } from './order-board-page/data-actions';
|
||||
import { createNotificationActions } from './order-board-page/notification-actions';
|
||||
import { createSignalRActions } from './order-board-page/signalr-actions';
|
||||
import { createCardActions } from './order-hall-page/card-actions';
|
||||
import { createDataActions } from './order-hall-page/data-actions';
|
||||
import { createNotificationActions } from './order-hall-page/notification-actions';
|
||||
import { createSignalRActions } from './order-hall-page/signalr-actions';
|
||||
|
||||
/** 订单大厅页面 Hook。 */
|
||||
export function useOrderBoardPage() {
|
||||
export function useOrderHallPage() {
|
||||
// 1. 页面状态
|
||||
const state = reactive<OrderBoardPageState>({
|
||||
const state = reactive<OrderHallPageState>({
|
||||
selectedStoreId: '',
|
||||
channel: 'all',
|
||||
isLoading: false,
|
||||
@@ -4,8 +4,8 @@ import BoardColumn from './components/BoardColumn.vue';
|
||||
import BoardStatsBar from './components/BoardStatsBar.vue';
|
||||
import BoardToolbar from './components/BoardToolbar.vue';
|
||||
import RejectOrderModal from './components/RejectOrderModal.vue';
|
||||
import { BOARD_COLUMNS } from './composables/order-board-page/constants';
|
||||
import { useOrderBoardPage } from './composables/useOrderBoardPage';
|
||||
import { HALL_COLUMNS } from './composables/order-hall-page/constants';
|
||||
import { useOrderHallPage } from './composables/useOrderHallPage';
|
||||
|
||||
import './styles/index.less';
|
||||
|
||||
@@ -20,7 +20,7 @@ const {
|
||||
openRejectModal,
|
||||
confirmReject,
|
||||
cancelReject,
|
||||
} = useOrderBoardPage();
|
||||
} = useOrderHallPage();
|
||||
|
||||
/** 根据列键获取对应卡片列表。 */
|
||||
function getCards(key: string) {
|
||||
@@ -66,7 +66,7 @@ function getCards(key: string) {
|
||||
<!-- 3. 看板四列 -->
|
||||
<div class="ob-board">
|
||||
<BoardColumn
|
||||
v-for="col in BOARD_COLUMNS"
|
||||
v-for="col in HALL_COLUMNS"
|
||||
:key="col.key"
|
||||
:title="col.title"
|
||||
:color-class="col.colorClass"
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 文件职责:订单大厅本地类型定义。
|
||||
*/
|
||||
import type { OrderBoardCard } from '#/api/order-board';
|
||||
import type { OrderBoardCard } from '#/api/order-hall';
|
||||
|
||||
/** 看板列键。 */
|
||||
export type BoardColumnKey = 'completed' | 'delivering' | 'making' | 'pending';
|
||||
@@ -52,7 +52,7 @@ export interface OrderUrgedPayload {
|
||||
}
|
||||
|
||||
/** 看板页面状态。 */
|
||||
export interface OrderBoardPageState {
|
||||
export interface OrderHallPageState {
|
||||
channel: BoardChannelFilter;
|
||||
completedCards: OrderBoardCard[];
|
||||
deliveringCards: OrderBoardCard[];
|
||||
Reference in New Issue
Block a user