From 4017b51458c1ab83c8d27172281f4b115a3e8355 Mon Sep 17 00:00:00 2001 From: log1997 <2694233102@qq.com> Date: Mon, 8 Dec 2025 16:31:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(person):=20=E5=AF=BC=E5=85=A5=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E6=97=B6=E6=B7=BB=E5=8A=A0uuid=E5=94=AF=E4=B8=80?= =?UTF-8?q?=E6=A0=87=E8=AF=86=E5=AD=97=E6=AE=B5=20#91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/storeType.ts | 81 +++++++++++++++++++++--------------------- src/utils/index.ts | 3 +- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/src/types/storeType.ts b/src/types/storeType.ts index 799d4b8..9d0d49f 100644 --- a/src/types/storeType.ts +++ b/src/types/storeType.ts @@ -1,53 +1,54 @@ export interface IPersonConfig { - id: number; - uid: string; - name: string; - department: string; - identity: string; - avatar: string; - isWin: boolean; - x: number; + id: number + uid: string + uuid: string + name: string + department: string + identity: string + avatar: string + isWin: boolean + x: number y: number - createTime: string; - updateTime: string; - prizeName: string[]; - prizeId: string[]; - prizeTime: string[]; + createTime: string + updateTime: string + prizeName: string[] + prizeId: string[] + prizeTime: string[] } export interface Separate { - id: string - count: number - isUsedCount: number + id: string + count: number + isUsedCount: number } export interface IPrizeConfig { - id: number | string - name: string - sort: number - isAll: boolean - count: number - isUsedCount: number - picture: { - id: string | number + id: number | string name: string - url: string - } - separateCount: { - enable: boolean - countList: Separate[] - } - desc: string - isShow: boolean - isUsed: boolean - frequency: number + sort: number + isAll: boolean + count: number + isUsedCount: number + picture: { + id: string | number + name: string + url: string + } + separateCount: { + enable: boolean + countList: Separate[] + } + desc: string + isShow: boolean + isUsed: boolean + frequency: number } export interface IMusic { - id: string - name: string - url: string + id: string + name: string + url: string } export interface IImage { - id: string - name: string - url: string + id: string + name: string + url: string } diff --git a/src/utils/index.ts b/src/utils/index.ts index 046d246..9138357 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,5 +1,5 @@ import dayjs from 'dayjs' - +import { v4 as uuidv4 } from 'uuid' /** * @description: 处理表格数据,添加x,y,id等信息 * @param tableData 表格数据 @@ -32,6 +32,7 @@ export function addOtherInfo(personList: any[]) { personList[i].prizeTime = [] as string[] personList[i].prizeId = [] personList[i].isWin = false + personList[i].uuid = uuidv4() } return personList