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:
@@ -12,9 +12,9 @@ const routes: RouteRecordRaw[] = [
|
|||||||
path: '/order',
|
path: '/order',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
name: 'OrderBoard',
|
name: 'OrderHall',
|
||||||
path: '/order/board',
|
path: '/order/hall',
|
||||||
component: () => import('#/views/order/board/index.vue'),
|
component: () => import('#/views/order/hall/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
icon: 'lucide:layout-dashboard',
|
icon: 'lucide:layout-dashboard',
|
||||||
title: '订单大厅',
|
title: '订单大厅',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { BoardColumnKey } from '../types';
|
import type { BoardColumnKey } from '../types';
|
||||||
|
|
||||||
import type { OrderBoardCard } from '#/api/order-board';
|
import type { OrderBoardCard } from '#/api/order-hall';
|
||||||
|
|
||||||
import BoardOrderCard from './BoardOrderCard.vue';
|
import BoardOrderCard from './BoardOrderCard.vue';
|
||||||
|
|
||||||
@@ -2,16 +2,16 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { BoardColumnKey } from '../types';
|
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 {
|
import {
|
||||||
channelText,
|
channelText,
|
||||||
deliveryTypeText,
|
deliveryTypeText,
|
||||||
elapsedMinutes,
|
elapsedMinutes,
|
||||||
formatAmount,
|
formatAmount,
|
||||||
formatTime,
|
formatTime,
|
||||||
} from '../composables/order-board-page/helpers';
|
} from '../composables/order-hall-page/helpers';
|
||||||
|
|
||||||
const { card, columnKey } = defineProps<{
|
const { card, columnKey } = defineProps<{
|
||||||
card: OrderBoardCard;
|
card: OrderBoardCard;
|
||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
completePreparationApi,
|
completePreparationApi,
|
||||||
confirmDeliveryApi,
|
confirmDeliveryApi,
|
||||||
rejectOrderApi,
|
rejectOrderApi,
|
||||||
} from '#/api/order-board';
|
} from '#/api/order-hall';
|
||||||
|
|
||||||
/** 卡片操作动作选项。 */
|
/** 卡片操作动作选项。 */
|
||||||
interface CardActionsOptions {
|
interface CardActionsOptions {
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
import type { BoardChannelFilter, BoardColumnKey } from '../../types';
|
import type { BoardChannelFilter, BoardColumnKey } from '../../types';
|
||||||
|
|
||||||
/** 看板列定义。 */
|
/** 看板列定义。 */
|
||||||
export const BOARD_COLUMNS: {
|
export const HALL_COLUMNS: {
|
||||||
colorClass: string;
|
colorClass: string;
|
||||||
key: BoardColumnKey;
|
key: BoardColumnKey;
|
||||||
title: string;
|
title: string;
|
||||||
@@ -3,19 +3,19 @@
|
|||||||
*/
|
*/
|
||||||
import type { Ref } from 'vue';
|
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 {
|
import {
|
||||||
getOrderBoardApi,
|
getOrderBoardApi,
|
||||||
getOrderBoardStatsApi,
|
getOrderBoardStatsApi,
|
||||||
getPendingSinceApi,
|
getPendingSinceApi,
|
||||||
} from '#/api/order-board';
|
} from '#/api/order-hall';
|
||||||
|
|
||||||
/** 数据加载动作选项。 */
|
/** 数据加载动作选项。 */
|
||||||
interface DataActionsOptions {
|
interface DataActionsOptions {
|
||||||
state: OrderBoardPageState;
|
state: OrderHallPageState;
|
||||||
statsRef: Ref<{
|
statsRef: Ref<{
|
||||||
completedCount: number;
|
completedCount: number;
|
||||||
deliveringCount: number;
|
deliveringCount: number;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import type {
|
import type {
|
||||||
NewOrderPayload,
|
NewOrderPayload,
|
||||||
OrderBoardPageState,
|
OrderHallPageState,
|
||||||
OrderStatusChangedPayload,
|
OrderStatusChangedPayload,
|
||||||
OrderUrgedPayload,
|
OrderUrgedPayload,
|
||||||
} from '../../types';
|
} from '../../types';
|
||||||
@@ -8,13 +8,13 @@ import type {
|
|||||||
/**
|
/**
|
||||||
* 文件职责:订单大厅 SignalR 连接与事件处理。
|
* 文件职责:订单大厅 SignalR 连接与事件处理。
|
||||||
*/
|
*/
|
||||||
import type { OrderBoardCard } from '#/api/order-board';
|
import type { OrderBoardCard } from '#/api/order-hall';
|
||||||
|
|
||||||
import { useSignalR } from '#/hooks/useSignalR';
|
import { useSignalR } from '#/hooks/useSignalR';
|
||||||
|
|
||||||
/** SignalR 动作选项。 */
|
/** SignalR 动作选项。 */
|
||||||
interface SignalRActionsOptions {
|
interface SignalRActionsOptions {
|
||||||
state: OrderBoardPageState;
|
state: OrderHallPageState;
|
||||||
onNewOrder?: () => void;
|
onNewOrder?: () => void;
|
||||||
onUrge?: () => void;
|
onUrge?: () => void;
|
||||||
catchUpSince: (since: Date) => Promise<OrderBoardCard[]>;
|
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 { onMounted, onUnmounted, reactive, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { createCardActions } from './order-board-page/card-actions';
|
import { createCardActions } from './order-hall-page/card-actions';
|
||||||
import { createDataActions } from './order-board-page/data-actions';
|
import { createDataActions } from './order-hall-page/data-actions';
|
||||||
import { createNotificationActions } from './order-board-page/notification-actions';
|
import { createNotificationActions } from './order-hall-page/notification-actions';
|
||||||
import { createSignalRActions } from './order-board-page/signalr-actions';
|
import { createSignalRActions } from './order-hall-page/signalr-actions';
|
||||||
|
|
||||||
/** 订单大厅页面 Hook。 */
|
/** 订单大厅页面 Hook。 */
|
||||||
export function useOrderBoardPage() {
|
export function useOrderHallPage() {
|
||||||
// 1. 页面状态
|
// 1. 页面状态
|
||||||
const state = reactive<OrderBoardPageState>({
|
const state = reactive<OrderHallPageState>({
|
||||||
selectedStoreId: '',
|
selectedStoreId: '',
|
||||||
channel: 'all',
|
channel: 'all',
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
@@ -4,8 +4,8 @@ import BoardColumn from './components/BoardColumn.vue';
|
|||||||
import BoardStatsBar from './components/BoardStatsBar.vue';
|
import BoardStatsBar from './components/BoardStatsBar.vue';
|
||||||
import BoardToolbar from './components/BoardToolbar.vue';
|
import BoardToolbar from './components/BoardToolbar.vue';
|
||||||
import RejectOrderModal from './components/RejectOrderModal.vue';
|
import RejectOrderModal from './components/RejectOrderModal.vue';
|
||||||
import { BOARD_COLUMNS } from './composables/order-board-page/constants';
|
import { HALL_COLUMNS } from './composables/order-hall-page/constants';
|
||||||
import { useOrderBoardPage } from './composables/useOrderBoardPage';
|
import { useOrderHallPage } from './composables/useOrderHallPage';
|
||||||
|
|
||||||
import './styles/index.less';
|
import './styles/index.less';
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ const {
|
|||||||
openRejectModal,
|
openRejectModal,
|
||||||
confirmReject,
|
confirmReject,
|
||||||
cancelReject,
|
cancelReject,
|
||||||
} = useOrderBoardPage();
|
} = useOrderHallPage();
|
||||||
|
|
||||||
/** 根据列键获取对应卡片列表。 */
|
/** 根据列键获取对应卡片列表。 */
|
||||||
function getCards(key: string) {
|
function getCards(key: string) {
|
||||||
@@ -66,7 +66,7 @@ function getCards(key: string) {
|
|||||||
<!-- 3. 看板四列 -->
|
<!-- 3. 看板四列 -->
|
||||||
<div class="ob-board">
|
<div class="ob-board">
|
||||||
<BoardColumn
|
<BoardColumn
|
||||||
v-for="col in BOARD_COLUMNS"
|
v-for="col in HALL_COLUMNS"
|
||||||
:key="col.key"
|
:key="col.key"
|
||||||
:title="col.title"
|
:title="col.title"
|
||||||
:color-class="col.colorClass"
|
: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';
|
export type BoardColumnKey = 'completed' | 'delivering' | 'making' | 'pending';
|
||||||
@@ -52,7 +52,7 @@ export interface OrderUrgedPayload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 看板页面状态。 */
|
/** 看板页面状态。 */
|
||||||
export interface OrderBoardPageState {
|
export interface OrderHallPageState {
|
||||||
channel: BoardChannelFilter;
|
channel: BoardChannelFilter;
|
||||||
completedCards: OrderBoardCard[];
|
completedCards: OrderBoardCard[];
|
||||||
deliveringCards: OrderBoardCard[];
|
deliveringCards: OrderBoardCard[];
|
||||||
Reference in New Issue
Block a user