棋子暂存区、充值订单补单
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
This commit is contained in:
parent
a1bd2b850e
commit
fc9455cfce
@ -54,6 +54,7 @@ export interface UserLogInfo {
|
||||
Face?:number;
|
||||
Order: UserLogOrder[];
|
||||
ChessMap?:string;
|
||||
ChessBuffer?: Record<string, number>;
|
||||
Heatmap?: heatType[];
|
||||
ActLog?:actlog[];
|
||||
MaxCharge?: number;
|
||||
@ -69,9 +70,11 @@ export interface actlog {
|
||||
|
||||
export interface UserOrder {
|
||||
Id: number;
|
||||
OrderId: number;
|
||||
AppId?: number;
|
||||
ServerId?: number;
|
||||
OrderId: string;
|
||||
Price: number;
|
||||
PayChannelOrderId: number;
|
||||
PayChannelOrderId: string;
|
||||
ProductId: number;
|
||||
CreateTime: number;
|
||||
PayTime: number;
|
||||
@ -80,6 +83,30 @@ export interface UserOrder {
|
||||
CreateTimeStr?: string;
|
||||
PayTimeStr?: string;
|
||||
PayStatus?:number;
|
||||
ReissueAuditId?: number;
|
||||
ReissueStatus?: number;
|
||||
ReissueReason?: string;
|
||||
ReissueApplicant?: string;
|
||||
ReissueReviewer?: string;
|
||||
ReissueReviewTime?: number;
|
||||
ReissueRemark?: string;
|
||||
ReissueThirdOrder?: string;
|
||||
}
|
||||
|
||||
export namespace OrderReissueApi {
|
||||
export interface ApplyParams {
|
||||
AppId: number;
|
||||
OrderId: string;
|
||||
Reason: string;
|
||||
ServerId: number;
|
||||
ThirdPartyOrderId: string;
|
||||
Uid: number;
|
||||
}
|
||||
|
||||
export interface ReviewParams {
|
||||
audit_id: number;
|
||||
review_remark?: string;
|
||||
}
|
||||
}
|
||||
|
||||
export async function getUserLogAssetApi(data: UserLogAssetParam) {
|
||||
@ -98,6 +125,18 @@ export async function getUserlogOrderApi(data: UserLogAssetParam) {
|
||||
return requestClient.post<UserOrder>('/log/order', data);
|
||||
}
|
||||
|
||||
export async function addOrderReissueApi(data: OrderReissueApi.ApplyParams) {
|
||||
return requestClient.post('/log/order/reissue/apply', data);
|
||||
}
|
||||
|
||||
export async function approveOrderReissueApi(data: OrderReissueApi.ReviewParams) {
|
||||
return requestClient.post('/log/order/reissue/approve', data);
|
||||
}
|
||||
|
||||
export async function rejectOrderReissueApi(data: OrderReissueApi.ReviewParams) {
|
||||
return requestClient.post('/log/order/reissue/reject', data);
|
||||
}
|
||||
|
||||
export namespace LoginCountApi {
|
||||
export interface Params {
|
||||
Appid: number;
|
||||
|
||||
@ -0,0 +1,85 @@
|
||||
<script setup lang="ts">
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { addOrderReissueApi } from '#/api/core/log';
|
||||
|
||||
interface ModalData {
|
||||
Uid: number;
|
||||
AppId: number;
|
||||
ServerId: number;
|
||||
OrderId: string;
|
||||
PayChannelOrderId?: string;
|
||||
}
|
||||
|
||||
const [Form, FormApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
},
|
||||
},
|
||||
layout: 'horizontal',
|
||||
schema: [
|
||||
{
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入第三方订单号',
|
||||
},
|
||||
fieldName: 'ThirdPartyOrderId',
|
||||
formItemClass: 'col-span-2',
|
||||
label: '第三方订单号',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
component: 'Textarea',
|
||||
componentProps: {
|
||||
placeholder: '请填写补单原因',
|
||||
rows: 4,
|
||||
},
|
||||
fieldName: 'Reason',
|
||||
formItemClass: 'col-span-2',
|
||||
label: '补单理由',
|
||||
rules: 'required',
|
||||
},
|
||||
],
|
||||
showDefaultActions: false,
|
||||
wrapperClass: 'grid-cols-2',
|
||||
});
|
||||
|
||||
const [Modal, modalApi] = useVbenModal({
|
||||
confirmText: '提交审核',
|
||||
onOpened: async () => {
|
||||
const modalData = modalApi.getData<ModalData>();
|
||||
await FormApi.resetForm();
|
||||
await FormApi.setValues({
|
||||
Reason: '',
|
||||
ThirdPartyOrderId: modalData?.PayChannelOrderId || '',
|
||||
});
|
||||
},
|
||||
onConfirm: async () => {
|
||||
const values = await FormApi.getValues();
|
||||
const modalData = modalApi.getData<ModalData>();
|
||||
await addOrderReissueApi({
|
||||
AppId: modalData.AppId,
|
||||
OrderId: modalData.OrderId,
|
||||
Reason: values.Reason,
|
||||
ServerId: modalData.ServerId,
|
||||
ThirdPartyOrderId: values.ThirdPartyOrderId,
|
||||
Uid: modalData.Uid,
|
||||
});
|
||||
message.success('补单申请已提交审核');
|
||||
modalApi.close();
|
||||
},
|
||||
});
|
||||
|
||||
defineOptions({
|
||||
name: 'OrderReissueModal',
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Modal title="申请补单" :width="640">
|
||||
<Form />
|
||||
</Modal>
|
||||
</template>
|
||||
@ -1,28 +1,52 @@
|
||||
<script setup lang="ts">
|
||||
import type { VbenFormProps } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import type { UserOrder } from '#/api/core/log';
|
||||
import type { AppData } from '#/api/core/server';
|
||||
|
||||
import { inject, onMounted, ref } from 'vue';
|
||||
|
||||
import { Page } from '@vben/common-ui';
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { useAccess } from '@vben/access';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getUserlogOrderApi } from '#/api/core/log';
|
||||
import {
|
||||
approveOrderReissueApi,
|
||||
getUserlogOrderApi,
|
||||
rejectOrderReissueApi,
|
||||
} from '#/api/core/log';
|
||||
import { getAppListApi } from '#/api/core/server';
|
||||
import { globalState } from '#/store/globalState';
|
||||
import { rechargeData } from '#/store/recharge';
|
||||
import OrderReissueModal from '#/views/userlog/components/order-reissue-modal.vue';
|
||||
import { Button, message, Modal, Space, Tag } from 'ant-design-vue';
|
||||
|
||||
const state = inject('globalState', globalState);
|
||||
const { hasAccessByRoles } = useAccess();
|
||||
|
||||
interface RowType {
|
||||
interface RowType extends UserOrder {
|
||||
Uid: string;
|
||||
Event: string;
|
||||
Param: string;
|
||||
timestamp: string;
|
||||
}
|
||||
const appList = ref<AppData[]>([]);
|
||||
|
||||
function getReissueStatusText(status?: number) {
|
||||
if (status === 1) return '待审核';
|
||||
if (status === 2) return '已通过';
|
||||
if (status === 3) return '已驳回';
|
||||
return '-';
|
||||
}
|
||||
|
||||
function getReissueStatusColor(status?: number) {
|
||||
if (status === 1) return 'processing';
|
||||
if (status === 2) return 'success';
|
||||
if (status === 3) return 'error';
|
||||
return 'default';
|
||||
}
|
||||
|
||||
function canApplyReissue(row: RowType) {
|
||||
return !row.ReissueStatus && [0, 3].includes(row.PayStatus ?? -1);
|
||||
}
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
// 默认展开
|
||||
collapsed: false,
|
||||
@ -73,6 +97,14 @@ const gridOptions: VxeGridProps<RowType> = {
|
||||
},
|
||||
},
|
||||
{ field: 'CreateTimeStr', title: '创建时间' },
|
||||
{
|
||||
field: 'ReissueStatus',
|
||||
title: '补单状态',
|
||||
width: 100,
|
||||
slots: { default: 'reissue_status' },
|
||||
},
|
||||
{ field: 'ReissueThirdOrder', title: '补单三方单号', minWidth: 160 },
|
||||
{ field: 'ReissueReason', title: '补单理由', minWidth: 180 },
|
||||
{ field: 'PayTimeStr', title: '支付时间' },
|
||||
{
|
||||
field: 'PayType',
|
||||
@ -86,6 +118,7 @@ const gridOptions: VxeGridProps<RowType> = {
|
||||
},
|
||||
},
|
||||
{ field: 'Param', title: '参数' },
|
||||
{ title: '操作', width: 220, fixed: 'right', slots: { default: 'action' } },
|
||||
],
|
||||
exportConfig: {
|
||||
filename: '用户订单日志',
|
||||
@ -126,9 +159,65 @@ const gridOptions: VxeGridProps<RowType> = {
|
||||
rowConfig: {
|
||||
isHover: true,
|
||||
},
|
||||
showOverflow: true,
|
||||
};
|
||||
|
||||
const [Grid, GridApi] = useVbenVxeGrid({ formOptions, gridOptions });
|
||||
const [OrderReissueM, OrderReissueApi] = useVbenModal({
|
||||
connectedComponent: OrderReissueModal,
|
||||
onClosed: async () => {
|
||||
OrderReissueApi.close();
|
||||
await GridApi.query();
|
||||
},
|
||||
});
|
||||
|
||||
function openOrderReissue(row: RowType) {
|
||||
OrderReissueApi.setData({
|
||||
AppId: row.AppId || 1,
|
||||
OrderId: row.OrderId,
|
||||
PayChannelOrderId: row.PayChannelOrderId,
|
||||
ServerId: row.ServerId || 1,
|
||||
Uid: Number(row.Uid),
|
||||
});
|
||||
OrderReissueApi.open();
|
||||
}
|
||||
|
||||
async function refreshGrid() {
|
||||
await GridApi.query();
|
||||
}
|
||||
|
||||
function approveReissue(row: RowType) {
|
||||
const auditId = row.ReissueAuditId;
|
||||
if (!auditId) {
|
||||
message.error('缺少补单审核单ID');
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: '确认通过这条补单申请吗?',
|
||||
async onOk() {
|
||||
await approveOrderReissueApi({ audit_id: auditId });
|
||||
message.success('补单审核通过');
|
||||
await refreshGrid();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function rejectReissue(row: RowType) {
|
||||
const auditId = row.ReissueAuditId;
|
||||
if (!auditId) {
|
||||
message.error('缺少补单审核单ID');
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: '确认驳回这条补单申请吗?',
|
||||
async onOk() {
|
||||
await rejectOrderReissueApi({ audit_id: auditId });
|
||||
message.success('补单申请已驳回');
|
||||
await refreshGrid();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await getAppListApi();
|
||||
@ -156,6 +245,39 @@ onMounted(async () => {
|
||||
|
||||
<template>
|
||||
<Page auto-content-height>
|
||||
<Grid />
|
||||
<OrderReissueM />
|
||||
<Grid>
|
||||
<template #reissue_status="{ row }">
|
||||
<Tag :color="getReissueStatusColor(row.ReissueStatus)">
|
||||
{{ getReissueStatusText(row.ReissueStatus) }}
|
||||
</Tag>
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<Button
|
||||
v-if="canApplyReissue(row) && hasAccessByRoles(['super', 'AC2006'])"
|
||||
type="primary"
|
||||
@click="openOrderReissue(row)"
|
||||
>
|
||||
申请补单
|
||||
</Button>
|
||||
<Button
|
||||
v-if="row.ReissueStatus === 1 && hasAccessByRoles(['super', 'AC2007'])"
|
||||
type="primary"
|
||||
@click="approveReissue(row)"
|
||||
>
|
||||
通过
|
||||
</Button>
|
||||
<Button
|
||||
v-if="row.ReissueStatus === 1 && hasAccessByRoles(['super', 'AC2008'])"
|
||||
danger
|
||||
type="primary"
|
||||
@click="rejectReissue(row)"
|
||||
>
|
||||
驳回
|
||||
</Button>
|
||||
</Space>
|
||||
</template>
|
||||
</Grid>
|
||||
</Page>
|
||||
</template>
|
||||
|
||||
@ -1,29 +1,52 @@
|
||||
<script setup lang="ts">
|
||||
import type { VbenFormProps } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import type { UserOrder } from '#/api/core/log';
|
||||
import type { AppData } from '#/api/core/server';
|
||||
|
||||
import { inject, onMounted, ref } from 'vue';
|
||||
|
||||
import { Page } from '@vben/common-ui';
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { useAccess } from '@vben/access';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getUserlogOrderApi } from '#/api/core/log';
|
||||
import {
|
||||
approveOrderReissueApi,
|
||||
getUserlogOrderApi,
|
||||
rejectOrderReissueApi,
|
||||
} from '#/api/core/log';
|
||||
import { getAppListApi } from '#/api/core/server';
|
||||
import { globalState } from '#/store/globalState';
|
||||
import { rechargeData } from '#/store/recharge';
|
||||
import { Tag } from 'ant-design-vue';
|
||||
import OrderReissueModal from '#/views/userlog/components/order-reissue-modal.vue';
|
||||
import { Button, message, Modal, Space, Tag } from 'ant-design-vue';
|
||||
|
||||
const state = inject('globalState', globalState);
|
||||
const { hasAccessByRoles } = useAccess();
|
||||
|
||||
interface RowType {
|
||||
interface RowType extends UserOrder {
|
||||
Uid: string;
|
||||
Event: string;
|
||||
Param: string;
|
||||
timestamp: string;
|
||||
}
|
||||
const appList = ref<AppData[]>([]);
|
||||
|
||||
function getReissueStatusText(status?: number) {
|
||||
if (status === 1) return '待审核';
|
||||
if (status === 2) return '已通过';
|
||||
if (status === 3) return '已驳回';
|
||||
return '-';
|
||||
}
|
||||
|
||||
function getReissueStatusColor(status?: number) {
|
||||
if (status === 1) return 'processing';
|
||||
if (status === 2) return 'success';
|
||||
if (status === 3) return 'error';
|
||||
return 'default';
|
||||
}
|
||||
|
||||
function canApplyReissue(row: RowType) {
|
||||
return !row.ReissueStatus && [0, 3].includes(row.PayStatus ?? -1);
|
||||
}
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
// 默认展开
|
||||
collapsed: false,
|
||||
@ -51,7 +74,6 @@ const formOptions: VbenFormProps = {
|
||||
};
|
||||
const gridOptions: VxeGridProps<RowType> = {
|
||||
columns: [
|
||||
{ field: 'Uid', title: 'id' },
|
||||
{ field: 'OrderId', title: '订单号' },
|
||||
{ field: 'PayChannelOrderId', title: '3th订单号' },
|
||||
{ field: 'Price', title: '金额' },
|
||||
@ -63,6 +85,14 @@ const gridOptions: VxeGridProps<RowType> = {
|
||||
},
|
||||
},
|
||||
{ field: 'PayStatus', title: '支付状态', slots: { default: 'status' } },
|
||||
{
|
||||
field: 'ReissueStatus',
|
||||
title: '补单状态',
|
||||
width: 100,
|
||||
slots: { default: 'reissue_status' },
|
||||
},
|
||||
{ field: 'ReissueThirdOrder', title: '补单三方单号', minWidth: 160 },
|
||||
{ field: 'ReissueReason', title: '补单理由', minWidth: 180 },
|
||||
{ field: 'PayTimeStr', title: '支付时间' },
|
||||
{
|
||||
field: 'PayType',
|
||||
@ -75,7 +105,7 @@ const gridOptions: VxeGridProps<RowType> = {
|
||||
return cellValue;
|
||||
},
|
||||
},
|
||||
{ field: 'Param', title: '参数' },
|
||||
{ title: '操作', width: 220, fixed: 'right', slots: { default: 'action' } },
|
||||
],
|
||||
exportConfig: {
|
||||
filename: '用户订单日志',
|
||||
@ -117,9 +147,65 @@ const gridOptions: VxeGridProps<RowType> = {
|
||||
rowConfig: {
|
||||
isHover: true,
|
||||
},
|
||||
showOverflow: true,
|
||||
};
|
||||
|
||||
const [Grid, GridApi] = useVbenVxeGrid({ formOptions, gridOptions });
|
||||
const [OrderReissueM, OrderReissueApi] = useVbenModal({
|
||||
connectedComponent: OrderReissueModal,
|
||||
onClosed: async () => {
|
||||
OrderReissueApi.close();
|
||||
await GridApi.query();
|
||||
},
|
||||
});
|
||||
|
||||
function openOrderReissue(row: RowType) {
|
||||
OrderReissueApi.setData({
|
||||
AppId: row.AppId || Number(state.uid) / 100000000,
|
||||
OrderId: row.OrderId,
|
||||
PayChannelOrderId: row.PayChannelOrderId,
|
||||
ServerId: row.ServerId || 1,
|
||||
Uid: Number(row.Uid),
|
||||
});
|
||||
OrderReissueApi.open();
|
||||
}
|
||||
|
||||
async function refreshGrid() {
|
||||
await GridApi.query();
|
||||
}
|
||||
|
||||
function approveReissue(row: RowType) {
|
||||
const auditId = row.ReissueAuditId;
|
||||
if (!auditId) {
|
||||
message.error('缺少补单审核单ID');
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: '确认通过这条补单申请吗?',
|
||||
async onOk() {
|
||||
await approveOrderReissueApi({ audit_id: auditId });
|
||||
message.success('补单审核通过');
|
||||
await refreshGrid();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function rejectReissue(row: RowType) {
|
||||
const auditId = row.ReissueAuditId;
|
||||
if (!auditId) {
|
||||
message.error('缺少补单审核单ID');
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: '确认驳回这条补单申请吗?',
|
||||
async onOk() {
|
||||
await rejectOrderReissueApi({ audit_id: auditId });
|
||||
message.success('补单申请已驳回');
|
||||
await refreshGrid();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await getAppListApi();
|
||||
@ -147,6 +233,7 @@ onMounted(async () => {
|
||||
|
||||
<template>
|
||||
<Page auto-content-height>
|
||||
<OrderReissueM />
|
||||
<Grid>
|
||||
<template #status="{ row }">
|
||||
<Tag color="gray" v-if="row.PayStatus === 0">未支付</Tag>
|
||||
@ -155,6 +242,37 @@ onMounted(async () => {
|
||||
<Tag color="green" v-else-if="row.PayStatus === 3">已发货</Tag>
|
||||
<Tag v-else>未知态{{row.ProductId}}</Tag>
|
||||
</template>
|
||||
<template #reissue_status="{ row }">
|
||||
<Tag :color="getReissueStatusColor(row.ReissueStatus)">
|
||||
{{ getReissueStatusText(row.ReissueStatus) }}
|
||||
</Tag>
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<Button
|
||||
v-if="canApplyReissue(row) && hasAccessByRoles(['super', 'AC2006'])"
|
||||
type="primary"
|
||||
@click="openOrderReissue(row)"
|
||||
>
|
||||
申请补单
|
||||
</Button>
|
||||
<Button
|
||||
v-if="row.ReissueStatus === 1 && hasAccessByRoles(['super', 'AC2007'])"
|
||||
type="primary"
|
||||
@click="approveReissue(row)"
|
||||
>
|
||||
通过
|
||||
</Button>
|
||||
<Button
|
||||
v-if="row.ReissueStatus === 1 && hasAccessByRoles(['super', 'AC2008'])"
|
||||
danger
|
||||
type="primary"
|
||||
@click="rejectReissue(row)"
|
||||
>
|
||||
驳回
|
||||
</Button>
|
||||
</Space>
|
||||
</template>
|
||||
</Grid>
|
||||
</Page>
|
||||
</template>
|
||||
|
||||
@ -28,6 +28,7 @@ import orderTable from './order-table.vue';
|
||||
const projectItems: WorkbenchProjectItem[] = [];
|
||||
const gmPermissions:boolean = useAccess().hasAccessByRoles(['super']) || useAccess().hasAccessByRoles(['AC9301']);
|
||||
const chargeDisplay = computed(() => (Number(info.value?.Charge ?? 0)).toFixed(2));
|
||||
const chessBufferCount = computed(() => info.value.ChessBuffer.length);
|
||||
const banStatusText = computed(() => {
|
||||
if (info.value?.Ban === -1) {
|
||||
return '永久封禁';
|
||||
@ -245,6 +246,7 @@ const info = ref<{
|
||||
Face?: string;
|
||||
Order: Order[];
|
||||
Chess: Chess[];
|
||||
ChessBuffer: Chess[];
|
||||
Friend: friendRecord[];
|
||||
MaxCharge?: number;
|
||||
AdWatch?: number;
|
||||
@ -264,6 +266,7 @@ const info = ref<{
|
||||
TodayCumulative: '0h',
|
||||
Order: [],
|
||||
Chess: [],
|
||||
ChessBuffer: [],
|
||||
Friend: [],
|
||||
MaxCharge: 0,
|
||||
AdWatch: 0,
|
||||
@ -340,6 +343,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
); // 转换注册时间戳
|
||||
info.value.Face = faceTypeData[r.Face || 0] || '未知';
|
||||
info.value.Chess = Array.from({ length: 63 }, () => ({} as Chess));
|
||||
info.value.ChessBuffer = [];
|
||||
if (r.ChessMap) {
|
||||
for (const [key, value] of Object.entries(r.ChessMap)) {
|
||||
const [colStr = '0', rowStr = '0', lock = '0'] = key.split('@');
|
||||
@ -354,6 +358,20 @@ const [Modal, modalApi] = useVbenModal({
|
||||
});
|
||||
}
|
||||
}
|
||||
if (r.ChessBuffer) {
|
||||
let pos = 0;
|
||||
for (const [chessId, count] of Object.entries(r.ChessBuffer)) {
|
||||
const total = Number(count) || 0;
|
||||
for (let index = 0; index < total; index++) {
|
||||
info.value.ChessBuffer.push({
|
||||
Id: parseInt(chessId, 10),
|
||||
Icon: ((MergeData as Record<string, Merge>)[chessId]?.Icon) ?? '',
|
||||
Lock: 0,
|
||||
Pos: pos++,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const i in r.Order) {
|
||||
var chessArr = r.Order[i]?.ChessId
|
||||
var orderTypeName = Object.entries(orderTypeData).find(
|
||||
@ -516,7 +534,7 @@ function formatActLog(type: number, content = ''): [string, string] {
|
||||
</div>
|
||||
|
||||
<div class="player-detail-panel-grid mt-5">
|
||||
<div if="gmPermissions">
|
||||
<div v-if="gmPermissions">
|
||||
<Card class="player-detail-action-card" :bordered="false">
|
||||
<template #title>
|
||||
<div class="player-detail-card-title">
|
||||
@ -573,6 +591,16 @@ function formatActLog(type: number, content = ''): [string, string] {
|
||||
<div class="player-detail-section mt-6">
|
||||
<chessComponent :items="info.Chess" title="棋盘" />
|
||||
</div>
|
||||
<div class="player-detail-section player-detail-section--transparent mt-6">
|
||||
<Collapse class="player-detail-collapse" :bordered="false">
|
||||
<Collapse.Panel
|
||||
key="chess-buffer"
|
||||
:header="`棋子缓冲区 (${chessBufferCount})`"
|
||||
>
|
||||
<chessComponent :items="info.ChessBuffer" title="棋子缓冲区" />
|
||||
</Collapse.Panel>
|
||||
</Collapse>
|
||||
</div>
|
||||
<div class="player-detail-section mt-6">
|
||||
<friendComponent :Items="info.Friend" title="好友" />
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user