From 216d3ac8fe82ce1235c4462060e6447fdf4fbd02 Mon Sep 17 00:00:00 2001 From: zhenhui <1276357500@qq.com> Date: Tue, 17 Mar 2026 12:08:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=80=E6=9C=89=E8=A1=A8=E5=8D=95-=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E4=B8=AD=E8=8B=B1=E5=8F=8C=E8=AF=AD=E5=AF=B9=E7=85=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../art-header-bar/widget/ArtUserMenu.vue | 2 +- saiadmin-artd/src/locales/langs/en.json | 9 +++ .../src/locales/langs/en/dice/config.json | 23 ++++++ .../langs/en/dice/lottery_pool_config.json | 28 ++++++++ .../locales/langs/en/dice/play_record.json | 34 +++++++++ .../src/locales/langs/en/dice/player.json | 45 ++++++++++++ .../langs/en/dice/player_ticket_record.json | 15 ++++ .../langs/en/dice/player_wallet_record.json | 20 ++++++ saiadmin-artd/src/locales/langs/zh.json | 9 +++ .../src/locales/langs/zh/dice/config.json | 23 ++++++ .../langs/zh/dice/lottery_pool_config.json | 28 ++++++++ .../locales/langs/zh/dice/play_record.json | 34 +++++++++ .../src/locales/langs/zh/dice/player.json | 45 ++++++++++++ .../langs/zh/dice/player_ticket_record.json | 15 ++++ .../langs/zh/dice/player_wallet_record.json | 20 ++++++ .../dice/config/index/modules/edit-dialog.vue | 51 +++++++------- .../index/modules/current-pool-dialog.vue | 33 +++++---- .../index/modules/edit-dialog.vue | 40 +++++------ .../play_record/index/modules/edit-dialog.vue | 70 +++++++++---------- .../index/modules/WalletOperateDialog.vue | 47 +++++++------ .../dice/player/index/modules/edit-dialog.vue | 60 ++++++++-------- .../index/modules/edit-dialog.vue | 30 ++++---- .../index/modules/edit-dialog.vue | 40 +++++------ 23 files changed, 537 insertions(+), 184 deletions(-) diff --git a/saiadmin-artd/src/components/core/layouts/art-header-bar/widget/ArtUserMenu.vue b/saiadmin-artd/src/components/core/layouts/art-header-bar/widget/ArtUserMenu.vue index fd7c0cb..486ca17 100644 --- a/saiadmin-artd/src/components/core/layouts/art-header-bar/widget/ArtUserMenu.vue +++ b/saiadmin-artd/src/components/core/layouts/art-header-bar/widget/ArtUserMenu.vue @@ -39,7 +39,7 @@
  • - 清除缓存 + {{ $t('topBar.user.clearCache') }}
  • diff --git a/saiadmin-artd/src/locales/langs/en.json b/saiadmin-artd/src/locales/langs/en.json index 53beec1..6549544 100644 --- a/saiadmin-artd/src/locales/langs/en.json +++ b/saiadmin-artd/src/locales/langs/en.json @@ -22,6 +22,7 @@ "userCenter": "User center", "docs": "Document", "github": "Github", + "clearCache": "clear Cache", "lockScreen": "Lock screen", "logout": "Log out" }, @@ -38,6 +39,14 @@ "confirm": "Confirm", "logOutTips": "Do you want to log out?" }, + "form": { + "placeholderInput": "Please enter", + "placeholderSelect": "Please select", + "labelRemark": "Remark", + "labelStatus": "Status", + "labelName": "Name", + "close": "Close" + }, "search": { "placeholder": "Search page", "historyTitle": "Search history", diff --git a/saiadmin-artd/src/locales/langs/en/dice/config.json b/saiadmin-artd/src/locales/langs/en/dice/config.json index 83d824b..532b83c 100644 --- a/saiadmin-artd/src/locales/langs/en/dice/config.json +++ b/saiadmin-artd/src/locales/langs/en/dice/config.json @@ -1,4 +1,27 @@ { + "form": { + "dialogTitleAdd": "Add Dice Config", + "dialogTitleEdit": "Edit Dice Config", + "group": "Group", + "placeholderGroup": "Please enter group", + "title": "Title", + "placeholderTitleZh": "Please enter title (ZH)", + "titleEn": "Title (EN)", + "placeholderTitleEn": "Please enter title (EN)", + "configName": "Config Name", + "placeholderConfigName": "Please enter config name", + "value": "Value", + "placeholderValueZh": "Please enter value (ZH)", + "valueEn": "Value (EN)", + "placeholderValueEn": "Please enter value (EN)", + "ruleGroupRequired": "Group is required", + "ruleTitleRequired": "Title is required", + "ruleTitleEnMax": "Title (EN) max 255 characters", + "ruleConfigNameRequired": "Config name is required", + "ruleValueRequired": "Value is required", + "saveSuccess": "Added", + "updateSuccess": "Updated" + }, "search": { "group": "Group", "title": "Title", diff --git a/saiadmin-artd/src/locales/langs/en/dice/lottery_pool_config.json b/saiadmin-artd/src/locales/langs/en/dice/lottery_pool_config.json index a788e5a..cb9a3eb 100644 --- a/saiadmin-artd/src/locales/langs/en/dice/lottery_pool_config.json +++ b/saiadmin-artd/src/locales/langs/en/dice/lottery_pool_config.json @@ -1,5 +1,33 @@ { "name": "Name", + "form": { + "dialogTitleAdd": "Add Lottery Pool Config", + "dialogTitleEdit": "Edit Lottery Pool Config", + "placeholderName": "Please enter name", + "placeholderRemark": "Please enter remark", + "poolType": "Pool Type", + "placeholderPoolType": "Please select pool type", + "poolTypeNormal": "Normal", + "poolTypeKill": "Kill", + "poolTypeT1": "T1 High", + "safetyLine": "Safety Line", + "t1Weight": "T1 Pool Weight (%)", + "t2Weight": "T2 Pool Weight (%)", + "t3Weight": "T3 Pool Weight (%)", + "t4Weight": "T4 Pool Weight (%)", + "t5Weight": "T5 Pool Weight (%)", + "weightsSumHint": "Total pool weights: ", + "weightsSumUnit": "% / 100% (must equal 100%)", + "weightsSumUnitCurrent": "% / 100%", + "currentPoolTitle": "Current Lottery Pool", + "loading": "Loading...", + "poolName": "Pool Name", + "playerProfit": "Player Total Profit (profit_amount):", + "realtime": "Live", + "profitCalcHint": "Sum of (win amount including BIGWIN minus 100 ticket cost) per round; refreshes every 2s while open.", + "tierRuleTitle": "Tier Rule", + "tierRuleContent": "When player profit in this pool is below safety line, use player T*_weight; when above or equal, use pool T*_weight (kill)." + }, "toolbar": { "viewCurrentPool": "View Current Pool" }, diff --git a/saiadmin-artd/src/locales/langs/en/dice/play_record.json b/saiadmin-artd/src/locales/langs/en/dice/play_record.json index 2ae1d0a..96de97d 100644 --- a/saiadmin-artd/src/locales/langs/en/dice/play_record.json +++ b/saiadmin-artd/src/locales/langs/en/dice/play_record.json @@ -1,4 +1,38 @@ { + "form": { + "dialogTitleAdd": "Add Play Record", + "dialogTitleEdit": "Edit Play Record", + "player": "Player", + "placeholderPlayer": "Select player (by username)", + "lotteryPoolConfig": "Lottery Pool Config", + "placeholderLotteryPool": "Select lottery pool config", + "drawType": "Draw Type", + "paid": "Paid", + "free": "Free", + "isBigWin": "Big Win", + "noBigWin": "No", + "bigWin": "Big Win", + "winCoin": "Win Coin", + "placeholderWinCoin": "= Super + Reward", + "superWinCoin": "Super Win Coin", + "placeholderSuperWinCoin": "On BIGWIN", + "rewardWinCoin": "Reward Win Coin", + "placeholderRewardWinCoin": "Dice reward", + "direction": "Direction", + "placeholderDirection": "Select direction", + "clockwise": "Clockwise", + "anticlockwise": "Anticlockwise", + "startIndex": "Start Index", + "placeholderStartIndex": "Start index", + "targetIndex": "Target Index", + "placeholderTargetIndex": "Target index", + "rollArray": "Roll Array", + "rollArrayHint": "5 numbers, each 1–6", + "rollNumber": "Roll Sum", + "placeholderRollNumber": "Sum of 5 dice (5–30)", + "rewardConfig": "Reward Config", + "placeholderRewardConfig": "Select reward config (by UI text)" + }, "search": { "player": "Player", "lotteryPoolConfig": "Lottery Pool Config", diff --git a/saiadmin-artd/src/locales/langs/en/dice/player.json b/saiadmin-artd/src/locales/langs/en/dice/player.json index 099f1c1..f8f2ee9 100644 --- a/saiadmin-artd/src/locales/langs/en/dice/player.json +++ b/saiadmin-artd/src/locales/langs/en/dice/player.json @@ -1,5 +1,50 @@ { "name": "Name", + "form": { + "dialogTitleAdd": "Add Dice Player", + "dialogTitleEdit": "Edit Dice Player", + "username": "Username", + "placeholderUsername": "Please enter username", + "nickname": "Nickname", + "placeholderNickname": "Please enter nickname", + "phone": "Phone", + "placeholderPhone": "Please enter phone", + "password": "Password", + "placeholderPasswordEdit": "Leave blank to keep unchanged", + "status": "Status", + "adminId": "Admin", + "placeholderAdmin": "Select admin (optional)", + "coin": "Coin", + "placeholderCoinAdd": "Default 0 on create, read-only", + "lotteryPoolConfig": "Lottery Pool Config", + "placeholderLotteryPool": "Leave empty for custom weights below, or select pool", + "currentConfig": "Current Config", + "configLabelName": "Name", + "configLabelType": "Type", + "configLabelWeights": "T1–T5 Weights", + "configLabelRemark": "Remark", + "t1Weight": "T1 Pool Weight (%)", + "t2Weight": "T2 Pool Weight (%)", + "t3Weight": "T3 Pool Weight (%)", + "t4Weight": "T4 Pool Weight (%)", + "t5Weight": "T5 Pool Weight (%)", + "weightsSumHint": "Total pool weights: ", + "weightsSumUnit": "% / 100% (must equal 100%)", + "walletTitle": "Player Wallet Operation", + "walletPlayer": "Player", + "walletBalance": "Balance", + "operationType": "Operation Type", + "typeAdd": "Add", + "typeSub": "Deduct", + "coinChange": "Coin Change", + "placeholderCoinChange": "Positive; deduct cannot exceed balance", + "placeholderRemarkOptional": "Optional", + "ruleSelectType": "Please select operation type", + "ruleEnterCoin": "Please enter coin change", + "ruleCoinPositive": "Coin change must be greater than 0", + "ruleDeductExceed": "Deduct cannot exceed current balance", + "operateSuccess": "Success" + }, "search": { "username": "Username", "nickname": "Nickname", diff --git a/saiadmin-artd/src/locales/langs/en/dice/player_ticket_record.json b/saiadmin-artd/src/locales/langs/en/dice/player_ticket_record.json index f5b89e8..76dd400 100644 --- a/saiadmin-artd/src/locales/langs/en/dice/player_ticket_record.json +++ b/saiadmin-artd/src/locales/langs/en/dice/player_ticket_record.json @@ -1,4 +1,19 @@ { + "form": { + "dialogTitleAdd": "Add Ticket Record", + "dialogTitleEdit": "Edit Ticket Record", + "player": "Player", + "placeholderPlayer": "Select player (by username)", + "useCoins": "Use Coins", + "placeholderUseCoins": "Please enter use coins", + "paidDrawCount": "Paid Draw Count", + "placeholderPaidDrawCount": "Please enter paid draw count", + "freeDrawCount": "Free Draw Count", + "placeholderFreeDrawCount": "Please enter free draw count", + "totalDrawCount": "Total Draw Count", + "placeholderTotalDrawCount": "Auto sum", + "placeholderRemark": "Remark (required)" + }, "search": { "player": "Player", "useCoins": "Use Coins", diff --git a/saiadmin-artd/src/locales/langs/en/dice/player_wallet_record.json b/saiadmin-artd/src/locales/langs/en/dice/player_wallet_record.json index 6285446..28db0c8 100644 --- a/saiadmin-artd/src/locales/langs/en/dice/player_wallet_record.json +++ b/saiadmin-artd/src/locales/langs/en/dice/player_wallet_record.json @@ -1,4 +1,24 @@ { + "form": { + "dialogTitleAdd": "Add Wallet Record", + "dialogTitleEdit": "Edit Wallet Record", + "user": "User", + "placeholderUser": "Select user (by username)", + "type": "Type", + "placeholderType": "Please select type", + "typeRecharge": "Recharge", + "typeWithdraw": "Withdraw", + "typeBuyTicket": "Buy Tickets", + "typeAdminAdd": "Admin Add", + "typeAdminSub": "Admin Deduct", + "coinChange": "Coin Change", + "placeholderCoinChange": "Positive add, negative subtract", + "walletBefore": "Before", + "placeholderWalletBefore": "Auto from selected user", + "walletAfter": "After", + "placeholderWalletAfter": "Auto calculated", + "placeholderRemark": "Optional" + }, "search": { "type": "Type", "user": "User", diff --git a/saiadmin-artd/src/locales/langs/zh.json b/saiadmin-artd/src/locales/langs/zh.json index 558b8d2..785cb23 100644 --- a/saiadmin-artd/src/locales/langs/zh.json +++ b/saiadmin-artd/src/locales/langs/zh.json @@ -22,6 +22,7 @@ "userCenter": "个人中心", "docs": "使用文档", "github": "Github", + "clearCache": "清除缓存", "lockScreen": "锁定屏幕", "logout": "退出登录" }, @@ -38,6 +39,14 @@ "confirm": "确定", "logOutTips": "您是否要退出登录?" }, + "form": { + "placeholderInput": "请输入", + "placeholderSelect": "请选择", + "labelRemark": "备注", + "labelStatus": "状态", + "labelName": "名称", + "close": "关闭" + }, "search": { "placeholder": "搜索页面", "historyTitle": "搜索历史", diff --git a/saiadmin-artd/src/locales/langs/zh/dice/config.json b/saiadmin-artd/src/locales/langs/zh/dice/config.json index 7ab27e1..95d9a71 100644 --- a/saiadmin-artd/src/locales/langs/zh/dice/config.json +++ b/saiadmin-artd/src/locales/langs/zh/dice/config.json @@ -1,4 +1,27 @@ { + "form": { + "dialogTitleAdd": "新增摇色子配置", + "dialogTitleEdit": "编辑摇色子配置", + "group": "分组", + "placeholderGroup": "请输入分组", + "title": "标题", + "placeholderTitleZh": "请输入标题(中文)", + "titleEn": "标题(英文)", + "placeholderTitleEn": "请输入标题(英文)", + "configName": "配置名称", + "placeholderConfigName": "请输入配置名称", + "value": "值", + "placeholderValueZh": "请输入值(中文)", + "valueEn": "值(英文)", + "placeholderValueEn": "请输入值(英文)", + "ruleGroupRequired": "分组必需填写", + "ruleTitleRequired": "标题必需填写", + "ruleTitleEnMax": "英文标题长度需小于 255 字符", + "ruleConfigNameRequired": "配置名称必需填写", + "ruleValueRequired": "值必需填写", + "saveSuccess": "新增成功", + "updateSuccess": "修改成功" + }, "search": { "group": "分组", "title": "标题", diff --git a/saiadmin-artd/src/locales/langs/zh/dice/lottery_pool_config.json b/saiadmin-artd/src/locales/langs/zh/dice/lottery_pool_config.json index b2b5e6f..01c5dc1 100644 --- a/saiadmin-artd/src/locales/langs/zh/dice/lottery_pool_config.json +++ b/saiadmin-artd/src/locales/langs/zh/dice/lottery_pool_config.json @@ -1,5 +1,33 @@ { "name": "名称", + "form": { + "dialogTitleAdd": "新增色子奖池配置", + "dialogTitleEdit": "编辑色子奖池配置", + "placeholderName": "请输入名称", + "placeholderRemark": "请输入备注", + "poolType": "奖池类型", + "placeholderPoolType": "请选择奖池类型", + "poolTypeNormal": "正常", + "poolTypeKill": "强制杀猪", + "poolTypeT1": "T1高倍率", + "safetyLine": "安全线", + "t1Weight": "T1池权重(%)", + "t2Weight": "T2池权重(%)", + "t3Weight": "T3池权重(%)", + "t4Weight": "T4池权重(%)", + "t5Weight": "T5池权重(%)", + "weightsSumHint": "五个池权重总和:", + "weightsSumUnit": "% / 100%(必须为100%)", + "weightsSumUnitCurrent": "% / 100%(须为100%)", + "currentPoolTitle": "当前彩金池", + "loading": "加载中...", + "poolName": "池子名称", + "playerProfit": "玩家累计盈利(profit_amount):", + "realtime": "实时", + "profitCalcHint": "计算方式:每局按“当前中奖金额(含超级大奖 BIGWIN)减去抽奖券费用 100”累加,弹窗打开期间每 2 秒自动刷新", + "tierRuleTitle": "抽奖档位规则", + "tierRuleContent": "当玩家在当前彩金池的累计盈利 低于安全线 时,按 玩家 的 T*_weight 权重抽取档位;当累计盈利 高于或等于安全线 时,按 当前彩金池 的 T*_weight 权重抽取档位(杀分)。" + }, "toolbar": { "viewCurrentPool": "查看当前彩金池" }, diff --git a/saiadmin-artd/src/locales/langs/zh/dice/play_record.json b/saiadmin-artd/src/locales/langs/zh/dice/play_record.json index 21346e6..05120a4 100644 --- a/saiadmin-artd/src/locales/langs/zh/dice/play_record.json +++ b/saiadmin-artd/src/locales/langs/zh/dice/play_record.json @@ -1,4 +1,38 @@ { + "form": { + "dialogTitleAdd": "新增玩家抽奖记录", + "dialogTitleEdit": "编辑玩家抽奖记录", + "player": "玩家", + "placeholderPlayer": "请选择玩家(显示用户名)", + "lotteryPoolConfig": "彩金池配置", + "placeholderLotteryPool": "请选择彩金池配置", + "drawType": "抽奖类型", + "paid": "付费", + "free": "赠送", + "isBigWin": "是否中大奖", + "noBigWin": "无", + "bigWin": "中大奖", + "winCoin": "赢取平台币", + "placeholderWinCoin": "= 中大奖 + 摇色子中奖", + "superWinCoin": "中大奖平台币", + "placeholderSuperWinCoin": "豹子时发放", + "rewardWinCoin": "摇色子中奖平台币", + "placeholderRewardWinCoin": "摇色子中奖", + "direction": "方向", + "placeholderDirection": "请选择方向", + "clockwise": "顺时针", + "anticlockwise": "逆时针", + "startIndex": "起始索引", + "placeholderStartIndex": "起始索引", + "targetIndex": "终点索引", + "placeholderTargetIndex": "终点索引", + "rollArray": "摇取点数", + "rollArrayHint": "固定 5 个数,每个 1~6", + "rollNumber": "摇取点数和", + "placeholderRollNumber": "5 个色子点数之和(5~30)", + "rewardConfig": "奖励配置", + "placeholderRewardConfig": "请选择奖励配置(显示前端文本)" + }, "search": { "player": "玩家", "lotteryPoolConfig": "彩金池配置", diff --git a/saiadmin-artd/src/locales/langs/zh/dice/player.json b/saiadmin-artd/src/locales/langs/zh/dice/player.json index 173c396..d3a51f8 100644 --- a/saiadmin-artd/src/locales/langs/zh/dice/player.json +++ b/saiadmin-artd/src/locales/langs/zh/dice/player.json @@ -1,5 +1,50 @@ { "name": "名称", + "form": { + "dialogTitleAdd": "新增大富翁-玩家", + "dialogTitleEdit": "编辑大富翁-玩家", + "username": "用户名", + "placeholderUsername": "请输入用户名", + "nickname": "昵称", + "placeholderNickname": "请输入昵称", + "phone": "手机号", + "placeholderPhone": "请输入手机号", + "password": "密码", + "placeholderPasswordEdit": "编辑留空则不修改", + "status": "状态", + "adminId": "所属管理员", + "placeholderAdmin": "选择后台管理员(可选)", + "coin": "平台币", + "placeholderCoinAdd": "创建时默认0,不可改", + "lotteryPoolConfig": "彩金池配置", + "placeholderLotteryPool": "留空则使用下方自定义权重,或选择彩金池", + "currentConfig": "当前配置", + "configLabelName": "名称", + "configLabelType": "类型", + "configLabelWeights": "T1~T5 权重", + "configLabelRemark": "备注", + "t1Weight": "T1池权重(%)", + "t2Weight": "T2池权重(%)", + "t3Weight": "T3池权重(%)", + "t4Weight": "T4池权重(%)", + "t5Weight": "T5池权重(%)", + "weightsSumHint": "五个池权重总和:", + "weightsSumUnit": "% / 100%(必须为100%)", + "walletTitle": "玩家钱包操作", + "walletPlayer": "玩家", + "walletBalance": "钱包余额", + "operationType": "操作类型", + "typeAdd": "加点", + "typeSub": "扣点", + "coinChange": "平台币变动", + "placeholderCoinChange": "正数,扣点时不能超过余额", + "placeholderRemarkOptional": "选填,不填则按类型自动填写", + "ruleSelectType": "请选择操作类型", + "ruleEnterCoin": "请输入平台币变动", + "ruleCoinPositive": "平台币变动必须大于 0", + "ruleDeductExceed": "扣点不能超过当前余额", + "operateSuccess": "操作成功" + }, "search": { "username": "用户名", "nickname": "昵称", diff --git a/saiadmin-artd/src/locales/langs/zh/dice/player_ticket_record.json b/saiadmin-artd/src/locales/langs/zh/dice/player_ticket_record.json index b40845c..c0eb3a1 100644 --- a/saiadmin-artd/src/locales/langs/zh/dice/player_ticket_record.json +++ b/saiadmin-artd/src/locales/langs/zh/dice/player_ticket_record.json @@ -1,4 +1,19 @@ { + "form": { + "dialogTitleAdd": "新增抽奖券获取记录", + "dialogTitleEdit": "编辑抽奖券获取记录", + "player": "玩家", + "placeholderPlayer": "请选择玩家(显示用户名)", + "useCoins": "消耗硬币", + "placeholderUseCoins": "请输入消耗硬币", + "paidDrawCount": "购买抽奖次数", + "placeholderPaidDrawCount": "请输入购买抽奖次数", + "freeDrawCount": "赠送抽奖次数", + "placeholderFreeDrawCount": "请输入赠送抽奖次数", + "totalDrawCount": "总抽奖次数", + "placeholderTotalDrawCount": "自动求和", + "placeholderRemark": "请输入备注(必填)" + }, "search": { "player": "玩家", "useCoins": "消耗硬币", diff --git a/saiadmin-artd/src/locales/langs/zh/dice/player_wallet_record.json b/saiadmin-artd/src/locales/langs/zh/dice/player_wallet_record.json index 1ee164c..14e9860 100644 --- a/saiadmin-artd/src/locales/langs/zh/dice/player_wallet_record.json +++ b/saiadmin-artd/src/locales/langs/zh/dice/player_wallet_record.json @@ -1,4 +1,24 @@ { + "form": { + "dialogTitleAdd": "新增玩家钱包流水", + "dialogTitleEdit": "编辑玩家钱包流水", + "user": "用户", + "placeholderUser": "请选择用户(显示用户名)", + "type": "类型", + "placeholderType": "请选择类型", + "typeRecharge": "充值", + "typeWithdraw": "提现", + "typeBuyTicket": "购买抽奖次数", + "typeAdminAdd": "管理员加点", + "typeAdminSub": "管理员扣点", + "coinChange": "平台币变化", + "placeholderCoinChange": "正数增加、负数减少", + "walletBefore": "钱包操作前", + "placeholderWalletBefore": "选择用户后自动带出当前平台币", + "walletAfter": "钱包操作后", + "placeholderWalletAfter": "根据平台币变化自动计算", + "placeholderRemark": "选填" + }, "search": { "type": "类型", "user": "用户", diff --git a/saiadmin-artd/src/views/plugin/dice/config/index/modules/edit-dialog.vue b/saiadmin-artd/src/views/plugin/dice/config/index/modules/edit-dialog.vue index 8069108..f2f928c 100644 --- a/saiadmin-artd/src/views/plugin/dice/config/index/modules/edit-dialog.vue +++ b/saiadmin-artd/src/views/plugin/dice/config/index/modules/edit-dialog.vue @@ -1,43 +1,43 @@ @@ -46,6 +46,9 @@ import api from '../../../api/config/index' import { ElMessage } from 'element-plus' import type { FormInstance, FormRules } from 'element-plus' + import { useI18n } from 'vue-i18n' + + const { t } = useI18n() interface Props { modelValue: boolean @@ -79,13 +82,13 @@ /** * 表单验证规则 */ - const rules = reactive({ - group: [{ required: true, message: '分组必需填写', trigger: 'blur' }], - title: [{ required: true, message: '标题必需填写', trigger: 'blur' }], - title_en: [{ max: 255, message: '英文标题长度需小于 255 字符', trigger: 'blur' }], - name: [{ required: true, message: '配置名称必需填写', trigger: 'blur' }], - value: [{ required: true, message: '值必需填写', trigger: 'blur' }] - }) + const rules = computed(() => ({ + group: [{ required: true, message: t('page.form.ruleGroupRequired'), trigger: 'blur' }], + title: [{ required: true, message: t('page.form.ruleTitleRequired'), trigger: 'blur' }], + title_en: [{ max: 255, message: t('page.form.ruleTitleEnMax'), trigger: 'blur' }], + name: [{ required: true, message: t('page.form.ruleConfigNameRequired'), trigger: 'blur' }], + value: [{ required: true, message: t('page.form.ruleValueRequired'), trigger: 'blur' }] + })) /** * 初始数据 @@ -160,10 +163,10 @@ await formRef.value.validate() if (props.dialogType === 'add') { await api.save(formData) - ElMessage.success('新增成功') + ElMessage.success(t('page.form.saveSuccess')) } else { await api.update(formData) - ElMessage.success('修改成功') + ElMessage.success(t('page.form.updateSuccess')) } emit('success') handleClose() diff --git a/saiadmin-artd/src/views/plugin/dice/lottery_pool_config/index/modules/current-pool-dialog.vue b/saiadmin-artd/src/views/plugin/dice/lottery_pool_config/index/modules/current-pool-dialog.vue index 8a28399..e2645b9 100644 --- a/saiadmin-artd/src/views/plugin/dice/lottery_pool_config/index/modules/current-pool-dialog.vue +++ b/saiadmin-artd/src/views/plugin/dice/lottery_pool_config/index/modules/current-pool-dialog.vue @@ -1,41 +1,40 @@