所有页面-创建中英双语对照-优化翻译文档结构

This commit is contained in:
2026-03-17 11:42:16 +08:00
parent 4a7397ce04
commit c790f74905
110 changed files with 1729 additions and 421 deletions

View File

@@ -178,6 +178,7 @@
import { useMenuStore } from '@/store/modules/menu' import { useMenuStore } from '@/store/modules/menu'
import AppConfig from '@/config' import AppConfig from '@/config'
import { languageOptions } from '@/locales' import { languageOptions } from '@/locales'
import { invalidatePageLocaleCache } from '@/locales/pageLocaleLoader'
import { mittBus } from '@/utils/sys' import { mittBus } from '@/utils/sys'
import { themeAnimation } from '@/utils/ui/animation' import { themeAnimation } from '@/utils/ui/animation'
import { useCommon } from '@/hooks/core/useCommon' import { useCommon } from '@/hooks/core/useCommon'
@@ -288,6 +289,7 @@
if (locale.value === lang) return if (locale.value === lang) return
locale.value = lang locale.value = lang
userStore.setLanguage(lang) userStore.setLanguage(lang)
invalidatePageLocaleCache()
reload(50) reload(50)
} }

View File

@@ -308,12 +308,12 @@
// 是否显示分页器 // 是否显示分页器
const showPagination = computed(() => props.pagination && !isEmpty.value) const showPagination = computed(() => props.pagination && !isEmpty.value)
/** 表头 label 为 table. 开头的 i18n key 时自动翻译,切换语言后表头随动 */ /** 表头 label 为 table. 或 page. 开头的 i18n key 时自动翻译,切换语言后表头随动 */
const displayColumns = computed(() => { const displayColumns = computed(() => {
const list = props.columns || [] const list = props.columns || []
return list.map((col) => { return list.map((col) => {
const label = col.label const label = col.label
if (label && typeof label === 'string' && label.startsWith('table.') && i18n.global.te(label)) { if (label && typeof label === 'string' && (label.startsWith('table.') || label.startsWith('page.')) && i18n.global.te(label)) {
return { ...col, label: $t(label) } return { ...col, label: $t(label) }
} }
return col return col

View File

@@ -0,0 +1,42 @@
# 多语言文件说明
## 全局翻译(所有页面共用)
- `zh.json``en.json`:放在 `langs/` 根目录,包含菜单、公共表格操作(删除/添加/选择/操作/刷新等)、公共搜索栏(查询/重置/展开/收起、请输入/请选择、全部/启用/禁用等、以及非页面级的文案httpMsg、topBar、common、setting、login 等)。
## 页面级翻译(按路由加载)
路径规则:`langs/{语言}/{目录名}/{菜单名}.json`
示例:路由 `/dice/lottery_pool_config/index` 对应:
- 中文:`langs/zh/dice/lottery_pool_config.json`
- 英文:`langs/en/dice/lottery_pool_config.json`
### 单文件结构
```json
{
"name": "名称",
"search": {
"字段或占位 key": "中文文案"
},
"table": {
"列 key": "表头中文文案"
}
}
```
- 顶层字段(如 `name`):该页面用到的通用字段标签,在搜索或表格中通过 `$t('page.name')` 使用。
- `search`:搜索栏专用,如 `$t('page.search.poolType')``$t('page.search.placeholderName')`
- `table`:表格列头专用,如 `$t('page.table.poolType')`;列配置里 `label: 'page.table.xxx'` 会由表格组件自动翻译。
### 使用方式
- 搜索栏:`$t('page.name')``$t('page.search.xxx')`
- 表格列:`label: 'page.table.xxx'`art-table 会自动对 `page.` 开头的 label 做 `$t`)。
- 公共操作(删除、新增、操作等):继续使用 `$t('table.actions.xxx')`,来自全局 `zh.json` / `en.json`
### 加载逻辑
- 进入某路由时,`pageLocaleLoader` 根据 path 解析出 `目录名/菜单名`,动态加载对应语言的 json 并合并到 i18n 的 `page` 命名空间;切换语言会清空缓存,下次进入或刷新后加载新语言文件。

View File

@@ -230,6 +230,56 @@
"500": "Sorry, there was an error on the server", "500": "Sorry, there was an error on the server",
"gohome": "Go Home" "gohome": "Go Home"
}, },
"console": {
"card": {
"playerRegister": "Player Register",
"playerCharge": "Player Charge",
"playerWithdraw": "Player Withdraw",
"playerPlayCount": "Player Play Count",
"vsLastWeek": "vs Last Week"
},
"newPlayer": {
"title": "New Players",
"subtitle": "Latest 50 new player records",
"player": "Player",
"balance": "Balance",
"ticket": "Tickets"
},
"walletRecord": {
"title": "Player Charge Records",
"subtitle": "Latest 50 charge records",
"player": "Player",
"chargeAmount": "Amount",
"chargeTime": "Charge Time"
},
"salesOverview": {
"title": "Recent Player Charge Stats"
},
"activeUser": {
"title": "Monthly Player Charge Summary"
},
"todo": {
"title": "To Do",
"pending": "Pending"
},
"newUser": {
"title": "New Users",
"growth": "Growth this month",
"thisMonth": "This Month",
"lastMonth": "Last Month",
"thisYear": "This Year",
"avatar": "Avatar",
"region": "Region",
"gender": "Gender",
"progress": "Progress",
"male": "Male",
"female": "Female"
},
"dynamic": {
"title": "Activity",
"newCount": "New"
}
},
"menus": { "menus": {
"login": { "login": {
"title": "Login" "title": "Login"

View File

@@ -0,0 +1,18 @@
{
"search": {
"group": "Group",
"title": "Title",
"configName": "Config Name",
"placeholderGroup": "Please enter group",
"placeholderTitle": "Please enter title",
"placeholderConfigName": "Please enter config name"
},
"table": {
"group": "Group",
"title": "Title",
"titleEn": "Title (EN)",
"configName": "Config Name",
"value": "Value",
"valueEn": "Value (EN)"
}
}

View File

@@ -0,0 +1,24 @@
{
"name": "Name",
"toolbar": {
"viewCurrentPool": "View Current Pool"
},
"search": {
"poolType": "Pool Type",
"placeholderName": "Please enter name",
"placeholderPoolType": "Please select pool type",
"poolTypeNormal": "Normal",
"poolTypeKill": "Force Kill",
"poolTypeT1": "T1 High Rate"
},
"table": {
"name": "Name",
"poolType": "Pool Type",
"safetyLine": "Safety Line",
"t1PoolWeight": "T1 Pool Weight",
"t2PoolWeight": "T2 Pool Weight",
"t3PoolWeight": "T3 Pool Weight",
"t4PoolWeight": "T4 Pool Weight",
"t5PoolWeight": "T5 Pool Weight"
}
}

View File

@@ -0,0 +1,40 @@
{
"search": {
"player": "Player",
"lotteryPoolConfig": "Lottery Pool Config",
"drawType": "Draw Type",
"isBigWin": "Is Big Win",
"direction": "Direction",
"winCoin": "Win Coin",
"rollNumber": "Roll Number",
"rewardConfig": "Reward Config",
"rewardTier": "Reward Tier",
"usernameFuzzy": "Username (fuzzy)",
"nameFuzzy": "Name (fuzzy)",
"uiTextFuzzy": "UI Text (fuzzy)",
"paid": "Paid",
"free": "Free",
"noBigWin": "No",
"bigWin": "Big Win",
"clockwise": "Clockwise",
"anticlockwise": "Anticlockwise"
},
"table": {
"id": "ID",
"player": "Player",
"lotteryPoolConfig": "Lottery Pool Config",
"drawType": "Draw Type",
"isBigWin": "Is Big Win",
"winCoin": "Win Coin",
"superWinCoin": "Super Win Coin",
"rewardWinCoin": "Reward Win Coin",
"direction": "Direction",
"startIndex": "Start Index",
"targetIndex": "Target Index",
"rollArray": "Roll Array",
"rollNumber": "Roll Number",
"rewardConfig": "Reward Config",
"createTime": "Create Time",
"updateTime": "Update Time"
}
}

View File

@@ -0,0 +1,37 @@
{
"toolbar": {
"clearAllData": "Clear All Data",
"platformTotalProfit": "Platform Total Profit"
},
"search": {
"drawType": "Draw Type",
"direction": "Direction",
"isBigWin": "Is Big Win",
"winCoin": "Win Coin",
"rewardTier": "Reward Tier",
"rollNumber": "Roll Number",
"paid": "Paid",
"free": "Free",
"clockwise": "Clockwise",
"anticlockwise": "Anticlockwise",
"noBigWin": "No",
"bigWin": "Big Win"
},
"table": {
"id": "ID",
"player": "Player",
"lotteryPoolConfig": "Lottery Pool Config",
"drawType": "Draw Type",
"isBigWin": "Is Big Win",
"winCoin": "Win Coin",
"superWinCoin": "Super Win Coin",
"rewardWinCoin": "Reward Win Coin",
"direction": "Direction",
"startIndex": "Start Index",
"targetIndex": "Target Index",
"rollArray": "Roll Array",
"rollNumber": "Roll Number",
"rewardConfig": "Reward Config",
"createTime": "Create Time"
}
}

View File

@@ -0,0 +1,34 @@
{
"name": "Name",
"search": {
"username": "Username",
"nickname": "Nickname",
"phone": "Phone",
"status": "Status",
"coin": "Coin",
"lotteryPoolConfig": "Lottery Pool Config",
"placeholderUsername": "Please enter username",
"placeholderNickname": "Please enter nickname",
"placeholderPhoneFuzzy": "Phone (fuzzy)",
"placeholderAll": "All",
"exactSearch": "Exact"
},
"table": {
"username": "Username",
"phone": "Phone",
"nickname": "Nickname",
"status": "Status",
"coin": "Coin",
"lotteryPoolConfig": "Lottery Pool Config",
"t1Weight": "T1 Weight",
"t2Weight": "T2 Weight",
"t3Weight": "T3 Weight",
"t4Weight": "T4 Weight",
"t5Weight": "T5 Weight",
"totalDrawCount": "Total Draw Count",
"paidDrawCount": "Paid Draw Count",
"freeDrawCount": "Free Draw Count",
"createTime": "Create Time",
"updateTime": "Update Time"
}
}

View File

@@ -0,0 +1,21 @@
{
"search": {
"player": "Player",
"useCoins": "Use Coins",
"totalDrawCount": "Total Draw Count",
"paidDrawCount": "Paid Draw Count",
"freeDrawCount": "Free Draw Count",
"createTime": "Create Time",
"byUsername": "By username"
},
"table": {
"id": "ID",
"playerUsername": "Player Username",
"useCoins": "Use Coins",
"totalDrawCount": "Total Draw Count",
"paidDrawCount": "Paid Draw Count",
"freeDrawCount": "Free Draw Count",
"remark": "Remark",
"createTime": "Create Time"
}
}

View File

@@ -0,0 +1,29 @@
{
"search": {
"type": "Type",
"user": "User",
"coin": "Coin",
"createTime": "Create Time",
"typeRecharge": "Recharge",
"typeWithdraw": "Withdraw",
"typeBuyTicket": "Buy Draw",
"typeAdminAdd": "Admin Add",
"typeAdminSub": "Admin Deduct",
"byUsername": "By username"
},
"table": {
"id": "ID",
"user": "User",
"coinChange": "Coin Change",
"type": "Type",
"operator": "Operator",
"walletBefore": "Wallet Before",
"walletAfter": "Wallet After",
"remark": "Remark",
"totalDrawCount": "Total Draw Count",
"paidDrawCount": "Paid Draw Count",
"freeDrawCount": "Free Draw Count",
"createTime": "Create Time",
"typeDraw": "Draw"
}
}

View File

@@ -0,0 +1,21 @@
{
"toolbar": {
"weightRatio": "Weight Ratio",
"weightTest": "Test Weight"
},
"search": {
"tier": "Tier",
"clockwise": "Clockwise",
"anticlockwise": "Anticlockwise"
},
"table": {
"startIndex": "Start Index",
"endIndex": "End Index",
"tier": "Tier",
"dicePoints": "Dice Points",
"displayText": "Display Text",
"realEv": "Real EV",
"remark": "Remark",
"weight": "Weight"
}
}

View File

@@ -0,0 +1,23 @@
{
"toolbar": {
"gameRewardConfig": "Game Reward Config",
"createRewardRef": "Create Reward Reference"
},
"search": {
"dicePoints": "Dice Points",
"displayText": "Display Text",
"realEv": "Real EV",
"tier": "Tier",
"fuzzyQuery": "Fuzzy"
},
"table": {
"startIndex": "Start Index",
"endIndex": "End Index",
"tier": "Tier",
"dicePoints": "Dice Points",
"displayText": "Display Text",
"realEv": "Real EV",
"remark": "Remark",
"weight": "Weight"
}
}

View File

@@ -0,0 +1,18 @@
{
"toolbar": {
"viewDetail": "View Detail"
},
"table": {
"id": "ID",
"status": "Status",
"paidDraw": "Paid Draw",
"freeDraw": "Free Draw",
"platformProfit": "Platform Profit",
"totalDrawCount": "Total Draw Count",
"createdBy": "Created By",
"createTime": "Create Time",
"statusFail": "Failed",
"statusDone": "Done",
"statusTesting": "Testing"
}
}

View File

@@ -0,0 +1,18 @@
{
"search": {
"username": "Username",
"phone": "Phone",
"status": "Status",
"placeholderUsername": "Please enter username",
"placeholderPhone": "Please enter phone",
"searchSelectPlaceholder": "Please select"
},
"table": {
"preview": "Preview",
"fileName": "File Name",
"storageMode": "Storage",
"fileType": "File Type",
"fileSize": "File Size",
"uploadTime": "Upload Time"
}
}

View File

@@ -0,0 +1,19 @@
{
"search": {
"tableName": "Table Name",
"placeholderTableName": "Please enter table name"
},
"table": {
"tableName": "Table Name",
"tableComment": "Table Comment",
"tableEngine": "Table Engine",
"updateTime": "Update Time",
"totalRows": "Total Rows",
"fragmentSize": "Fragment Size",
"dataSize": "Data Size",
"collation": "Collation",
"createTime": "Create Time",
"deleteTime": "Delete Time",
"dataDetail": "Data Detail"
}
}

View File

@@ -0,0 +1,12 @@
{
"table": {
"select": "Select",
"dictName": "Dict Name",
"dictCode": "Dict Code",
"dictLabel": "Dict Label",
"dictValue": "Dict Value",
"color": "Color",
"sort": "Sort",
"status": "Status"
}
}

View File

@@ -0,0 +1,22 @@
{
"search": {
"loginUser": "Login User",
"loginIp": "Login IP",
"loginStatus": "Login Status",
"operTime": "Time",
"placeholderLoginUser": "Please enter login user",
"placeholderLoginIp": "Please enter login IP",
"placeholderLoginStatus": "Please select login status"
},
"table": {
"no": "No.",
"loginUser": "Login User",
"loginStatus": "Login Status",
"loginIp": "Login IP",
"operLocation": "Location",
"os": "OS",
"browser": "Browser",
"loginMessage": "Login Message",
"loginTime": "Login Time"
}
}

View File

@@ -0,0 +1,20 @@
{
"search": {
"operator": "Operator",
"router": "Route",
"operIp": "IP",
"operTime": "Time",
"placeholderOperator": "Please enter operator",
"placeholderOperRouter": "Please enter route",
"placeholderOperIp": "Please enter IP"
},
"table": {
"no": "No.",
"operator": "Operator",
"serviceName": "Service",
"router": "Route",
"operIp": "IP",
"operLocation": "Location",
"operTime": "Time"
}
}

View File

@@ -0,0 +1,15 @@
{
"search": {
"group": "Group",
"title": "Title",
"configName": "Config Name",
"placeholderGroup": "Please enter group",
"placeholderTitle": "Please enter title",
"placeholderConfigName": "Please enter config name"
},
"table": {
"select": "Select",
"configName": "Config Name",
"configKey": "Config Key"
}
}

View File

@@ -0,0 +1,18 @@
{
"search": {
"deptName": "Dept Name",
"deptCode": "Dept Code",
"status": "Status",
"placeholderDeptName": "Please enter dept name",
"placeholderDeptCode": "Please enter dept code",
"searchSelectPlaceholder": "Please select"
},
"table": {
"deptName": "Dept Name",
"deptCode": "Dept Code",
"leader": "Leader",
"sort": "Sort",
"status": "Status",
"createTime": "Create Time"
}
}

View File

@@ -0,0 +1,21 @@
{
"search": {
"menuName": "Menu Name",
"route": "Route",
"status": "Status",
"placeholderMenuName": "Please enter menu name",
"placeholderMenuRoute": "Please enter menu route",
"searchSelectPlaceholder": "Please select"
},
"table": {
"menuName": "Menu Name",
"menuType": "Menu Type",
"icon": "Icon",
"route": "Route",
"component": "Component",
"auth": "Auth",
"sort": "Sort",
"status": "Status",
"createTime": "Create Time"
}
}

View File

@@ -0,0 +1,17 @@
{
"search": {
"postName": "Post Name",
"postCode": "Post Code",
"status": "Status",
"placeholderPostName": "Please enter post name",
"placeholderPostCode": "Please enter post code",
"searchSelectPlaceholder": "Please select"
},
"table": {
"postName": "Post Name",
"postCode": "Post Code",
"sort": "Sort",
"status": "Status",
"createTime": "Create Time"
}
}

View File

@@ -0,0 +1,18 @@
{
"search": {
"roleName": "Role Name",
"roleCode": "Role Code",
"status": "Status",
"placeholderRoleName": "Please enter role name",
"placeholderRoleCode": "Please enter role code",
"searchSelectPlaceholder": "Please select"
},
"table": {
"roleName": "Role Name",
"roleCode": "Role Code",
"level": "Level",
"roleRemark": "Role Description",
"status": "Status",
"createTime": "Create Time"
}
}

View File

@@ -0,0 +1,21 @@
{
"search": {
"username": "Username",
"phone": "Phone",
"status": "Status",
"placeholderUsername": "Please enter username",
"placeholderPhone": "Please enter phone",
"searchSelectPlaceholder": "Please select"
},
"table": {
"username": "Username",
"phone": "Phone",
"dept": "Department",
"dashboard": "Dashboard",
"loginTime": "Last Login",
"agentId": "Agent ID",
"status": "Status",
"createTime": "Create Time",
"updateTime": "Update Time"
}
}

View File

@@ -0,0 +1,20 @@
{
"search": {
"tableName": "Table Name",
"placeholderTableName": "Please enter table name",
"placeholderDataSource": "Please enter data source"
},
"table": {
"tableName": "Table Name",
"tableDesc": "Table Desc",
"tableComment": "Table Comment",
"engine": "Engine",
"collation": "Collation",
"template": "Template",
"namespace": "Namespace",
"stub": "Stub",
"tplCategory": "Gen Type",
"updateTime": "Update Time",
"createTime": "Create Time"
}
}

View File

@@ -0,0 +1,21 @@
{
"search": {
"taskName": "Task Name",
"taskType": "Task Type",
"status": "Status",
"placeholderTaskName": "Please enter task name",
"searchSelectPlaceholder": "Please select"
},
"table": {
"no": "No.",
"taskName": "Task Name",
"taskType": "Task Type",
"rule": "Rule",
"target": "Target",
"status": "Status",
"updateDate": "Update Date",
"executeTime": "Execute Time",
"parameter": "Parameter",
"executeStatus": "Status"
}
}

View File

@@ -230,6 +230,56 @@
"500": "抱歉,服务器出错了", "500": "抱歉,服务器出错了",
"gohome": "返回首页" "gohome": "返回首页"
}, },
"console": {
"card": {
"playerRegister": "玩家注册",
"playerCharge": "玩家充值",
"playerWithdraw": "玩家提现",
"playerPlayCount": "玩家游玩次数",
"vsLastWeek": "较上周"
},
"newPlayer": {
"title": "新增玩家",
"subtitle": "最新50条新增玩家记录",
"player": "玩家",
"balance": "余额",
"ticket": "抽奖券"
},
"walletRecord": {
"title": "玩家充值记录",
"subtitle": "最新50条充值记录",
"player": "玩家",
"chargeAmount": "充值金额",
"chargeTime": "充值时间"
},
"salesOverview": {
"title": "近期玩家充值统计"
},
"activeUser": {
"title": "月度玩家充值汇总"
},
"todo": {
"title": "代办事项",
"pending": "待处理"
},
"newUser": {
"title": "新用户",
"growth": "这个月增长",
"thisMonth": "本月",
"lastMonth": "上月",
"thisYear": "今年",
"avatar": "头像",
"region": "地区",
"gender": "性别",
"progress": "进度",
"male": "男",
"female": "女"
},
"dynamic": {
"title": "动态",
"newCount": "新增"
}
},
"menus": { "menus": {
"login": { "login": {
"title": "登录" "title": "登录"
@@ -263,7 +313,39 @@
"user": "用户管理", "user": "用户管理",
"role": "角色管理", "role": "角色管理",
"userCenter": "个人中心", "userCenter": "个人中心",
"menu": "菜单管理" "menu": "菜单管理",
"dept": "部门管理",
"post": "岗位管理",
"config": "系统配置"
},
"safeguard": {
"title": "运维管理",
"dict": "数据字典",
"server": "服务监控",
"operLog": "操作日志",
"loginLog": "登录日志",
"emailLog": "邮件日志",
"database": "数据库",
"cache": "缓存管理",
"attachment": "附件管理"
},
"tool": {
"title": "开发工具",
"crontab": "定时任务",
"code": "代码生成"
},
"dice": {
"title": "大富翁-色子游戏",
"lotteryPoolConfig": "彩金池配置",
"player": "玩家管理",
"playerWalletRecord": "玩家钱包记录",
"playRecord": "玩家抽奖记录",
"playerTicketRecord": "玩家票券记录",
"rewardConfig": "奖励配置",
"reward": "色子奖励权重",
"rewardConfigRecord": "权重测试记录",
"playRecordTest": "抽奖记录(测试权重)",
"config": "游戏配置"
} }
}, },
"table": { "table": {

View File

@@ -0,0 +1,18 @@
{
"search": {
"group": "分组",
"title": "标题",
"configName": "配置名称",
"placeholderGroup": "请输入分组",
"placeholderTitle": "请输入标题",
"placeholderConfigName": "请输入配置名称"
},
"table": {
"group": "分组",
"title": "标题",
"titleEn": "标题(英文)",
"configName": "配置名称",
"value": "值",
"valueEn": "值(英文)"
}
}

View File

@@ -0,0 +1,24 @@
{
"name": "名称",
"toolbar": {
"viewCurrentPool": "查看当前彩金池"
},
"search": {
"poolType": "奖池类型",
"placeholderName": "请输入名称",
"placeholderPoolType": "请选择奖池类型",
"poolTypeNormal": "正常",
"poolTypeKill": "强制杀猪",
"poolTypeT1": "T1高倍率"
},
"table": {
"name": "名称",
"poolType": "奖池类型",
"safetyLine": "安全线",
"t1PoolWeight": "T1池权重",
"t2PoolWeight": "T2池权重",
"t3PoolWeight": "T3池权重",
"t4PoolWeight": "T4池权重",
"t5PoolWeight": "T5池权重"
}
}

View File

@@ -0,0 +1,40 @@
{
"search": {
"player": "玩家",
"lotteryPoolConfig": "彩金池配置",
"drawType": "抽奖类型",
"isBigWin": "是否中大奖",
"direction": "方向",
"winCoin": "赢取平台币",
"rollNumber": "摇取点数和",
"rewardConfig": "奖励配置",
"rewardTier": "奖励档位",
"usernameFuzzy": "用户名模糊",
"nameFuzzy": "名称模糊",
"uiTextFuzzy": "前端显示文本模糊",
"paid": "付费",
"free": "赠送",
"noBigWin": "无",
"bigWin": "中大奖",
"clockwise": "顺时针",
"anticlockwise": "逆时针"
},
"table": {
"id": "ID",
"player": "玩家",
"lotteryPoolConfig": "彩金池配置",
"drawType": "抽奖类型",
"isBigWin": "是否中大奖",
"winCoin": "赢取平台币",
"superWinCoin": "中大奖平台币",
"rewardWinCoin": "摇色子中奖平台币",
"direction": "方向",
"startIndex": "起始索引",
"targetIndex": "终点索引",
"rollArray": "摇取点数",
"rollNumber": "摇取点数和",
"rewardConfig": "奖励配置",
"createTime": "创建时间",
"updateTime": "更新时间"
}
}

View File

@@ -0,0 +1,37 @@
{
"toolbar": {
"clearAllData": "一键删除所有数据",
"platformTotalProfit": "平台总盈利"
},
"search": {
"drawType": "抽奖类型",
"direction": "方向",
"isBigWin": "是否中大奖",
"winCoin": "赢取平台币",
"rewardTier": "奖励档位",
"rollNumber": "摇取点数和",
"paid": "付费",
"free": "赠送",
"clockwise": "顺时针",
"anticlockwise": "逆时针",
"noBigWin": "无",
"bigWin": "中大奖"
},
"table": {
"id": "ID",
"player": "玩家",
"lotteryPoolConfig": "彩金池配置",
"drawType": "抽奖类型",
"isBigWin": "是否中大奖",
"winCoin": "赢取平台币",
"superWinCoin": "中大奖平台币",
"rewardWinCoin": "摇色子中奖平台币",
"direction": "方向",
"startIndex": "起始索引",
"targetIndex": "终点索引",
"rollArray": "摇取点数",
"rollNumber": "摇取点数和",
"rewardConfig": "奖励配置",
"createTime": "创建时间"
}
}

View File

@@ -0,0 +1,34 @@
{
"name": "名称",
"search": {
"username": "用户名",
"nickname": "昵称",
"phone": "手机号",
"status": "状态",
"coin": "平台币",
"lotteryPoolConfig": "彩金池配置",
"placeholderUsername": "请输入用户名",
"placeholderNickname": "请输入昵称",
"placeholderPhoneFuzzy": "手机号模糊查询",
"placeholderAll": "全部",
"exactSearch": "精确搜索"
},
"table": {
"username": "用户名",
"phone": "手机号",
"nickname": "昵称",
"status": "状态",
"coin": "平台币",
"lotteryPoolConfig": "彩金池配置",
"t1Weight": "T1权重",
"t2Weight": "T2权重",
"t3Weight": "T3权重",
"t4Weight": "T4权重",
"t5Weight": "T5权重",
"totalDrawCount": "总抽奖次数",
"paidDrawCount": "购买抽奖次数",
"freeDrawCount": "赠送抽奖次数",
"createTime": "创建时间",
"updateTime": "更新时间"
}
}

View File

@@ -0,0 +1,21 @@
{
"search": {
"player": "玩家",
"useCoins": "消耗硬币",
"totalDrawCount": "总抽奖次数",
"paidDrawCount": "购买抽奖次数",
"freeDrawCount": "赠送抽奖次数",
"createTime": "创建时间",
"byUsername": "按用户名搜索"
},
"table": {
"id": "ID",
"playerUsername": "玩家用户名",
"useCoins": "消耗硬币",
"totalDrawCount": "总抽奖次数",
"paidDrawCount": "购买抽奖次数",
"freeDrawCount": "赠送抽奖次数",
"remark": "备注",
"createTime": "创建时间"
}
}

View File

@@ -0,0 +1,29 @@
{
"search": {
"type": "类型",
"user": "用户",
"coin": "平台币",
"createTime": "创建时间",
"typeRecharge": "充值",
"typeWithdraw": "提现",
"typeBuyTicket": "购买抽奖次数",
"typeAdminAdd": "管理员加点",
"typeAdminSub": "管理员扣点",
"byUsername": "按用户名搜索"
},
"table": {
"id": "ID",
"user": "用户",
"coinChange": "平台币变化",
"type": "类型",
"operator": "操作人",
"walletBefore": "钱包操作前",
"walletAfter": "钱包操作后",
"remark": "备注",
"totalDrawCount": "总抽奖次数",
"paidDrawCount": "购买抽奖次数",
"freeDrawCount": "赠送抽奖次数",
"createTime": "创建时间",
"typeDraw": "抽奖"
}
}

View File

@@ -0,0 +1,21 @@
{
"toolbar": {
"weightRatio": "权重配比",
"weightTest": "一键测试权重"
},
"search": {
"tier": "档位",
"clockwise": "顺时针",
"anticlockwise": "逆时针"
},
"table": {
"startIndex": "起始索引",
"endIndex": "结束索引(end_index)",
"tier": "档位",
"dicePoints": "色子点数(摇取5-30)",
"displayText": "显示文本",
"realEv": "实际中奖金额",
"remark": "备注",
"weight": "权重(1-10000)"
}
}

View File

@@ -0,0 +1,23 @@
{
"toolbar": {
"gameRewardConfig": "游戏奖励配置",
"createRewardRef": "创建奖励对照"
},
"search": {
"dicePoints": "色子点数(摇取5-30)",
"displayText": "显示文本",
"realEv": "实际中奖金额",
"tier": "档位",
"fuzzyQuery": "模糊查询"
},
"table": {
"startIndex": "起始索引",
"endIndex": "结束索引(end_index)",
"tier": "档位",
"dicePoints": "色子点数(摇取5-30)",
"displayText": "显示文本",
"realEv": "实际中奖金额",
"remark": "备注",
"weight": "权重(1-10000)"
}
}

View File

@@ -0,0 +1,18 @@
{
"toolbar": {
"viewDetail": "查看详情"
},
"table": {
"id": "ID",
"status": "状态",
"paidDraw": "付费抽取",
"freeDraw": "免费抽取",
"platformProfit": "平台赚取金额",
"totalDrawCount": "总抽奖次数",
"createdBy": "创建管理员",
"createTime": "创建时间",
"statusFail": "失败",
"statusDone": "完成",
"statusTesting": "测试中"
}
}

View File

@@ -0,0 +1,18 @@
{
"search": {
"username": "用户名",
"phone": "手机号",
"status": "状态",
"placeholderUsername": "请输入用户名",
"placeholderPhone": "请输入手机号",
"searchSelectPlaceholder": "请选择"
},
"table": {
"preview": "预览",
"fileName": "文件名称",
"storageMode": "存储模式",
"fileType": "文件类型",
"fileSize": "文件大小",
"uploadTime": "上传时间"
}
}

View File

@@ -0,0 +1,19 @@
{
"search": {
"tableName": "表名称",
"placeholderTableName": "请输入数据表名称"
},
"table": {
"tableName": "表名称",
"tableComment": "表注释",
"tableEngine": "表引擎",
"updateTime": "更新时间",
"totalRows": "总行数",
"fragmentSize": "碎片大小",
"dataSize": "数据大小",
"collation": "编码",
"createTime": "创建时间",
"deleteTime": "删除时间",
"dataDetail": "数据详情"
}
}

View File

@@ -0,0 +1,12 @@
{
"table": {
"select": "选中",
"dictName": "字典名称",
"dictCode": "字典标识",
"dictLabel": "字典标签",
"dictValue": "字典键值",
"color": "颜色",
"sort": "排序",
"status": "状态"
}
}

View File

@@ -0,0 +1,20 @@
{
"search": {
"labelFrom": "发件人",
"labelTo": "收件人",
"placeholderSendStatus": "请选择发送状态",
"placeholderFrom": "请输入发件人",
"placeholderTo": "请输入收件人",
"operTime": "发送时间"
},
"table": {
"no": "编号",
"gateway": "服务Host",
"emailFrom": "发件人",
"emailTo": "收件人",
"emailCode": "验证码",
"sendStatus": "发送状态",
"emailResponse": "发送结果",
"sendTime": "发送时间"
}
}

View File

@@ -0,0 +1,22 @@
{
"search": {
"loginUser": "登录用户",
"loginIp": "登录IP",
"loginStatus": "登录状态",
"operTime": "操作时间",
"placeholderLoginUser": "请输入登录用户",
"placeholderLoginIp": "请输入登录IP",
"placeholderLoginStatus": "请选择登录状态"
},
"table": {
"no": "编号",
"loginUser": "登录用户",
"loginStatus": "登录状态",
"loginIp": "登录IP",
"operLocation": "操作地点",
"os": "操作系统",
"browser": "浏览器",
"loginMessage": "登录信息",
"loginTime": "登录时间"
}
}

View File

@@ -0,0 +1,20 @@
{
"search": {
"operator": "操作用户",
"router": "路由",
"operIp": "操作IP",
"operTime": "操作时间",
"placeholderOperator": "请输入操作用户",
"placeholderOperRouter": "请输入操作路由",
"placeholderOperIp": "请输入操作IP"
},
"table": {
"no": "编号",
"operator": "操作用户",
"serviceName": "业务名称",
"router": "路由",
"operIp": "操作IP",
"operLocation": "操作地点",
"operTime": "操作时间"
}
}

View File

@@ -0,0 +1,15 @@
{
"search": {
"group": "分组",
"title": "标题",
"configName": "配置名称",
"placeholderGroup": "请输入分组",
"placeholderTitle": "请输入标题",
"placeholderConfigName": "请输入配置名称"
},
"table": {
"select": "选中",
"configName": "配置名称",
"configKey": "配置标识"
}
}

View File

@@ -0,0 +1,18 @@
{
"search": {
"deptName": "部门名称",
"deptCode": "部门编码",
"status": "状态",
"placeholderDeptName": "请输入部门名称",
"placeholderDeptCode": "请输入部门编码",
"searchSelectPlaceholder": "请选择"
},
"table": {
"deptName": "部门名称",
"deptCode": "部门编码",
"leader": "部门领导",
"sort": "排序",
"status": "状态",
"createTime": "创建时间"
}
}

View File

@@ -0,0 +1,21 @@
{
"search": {
"menuName": "菜单名称",
"route": "路由",
"status": "状态",
"placeholderMenuName": "请输入菜单名称",
"placeholderMenuRoute": "请输入菜单路由",
"searchSelectPlaceholder": "请选择"
},
"table": {
"menuName": "菜单名称",
"menuType": "菜单类型",
"icon": "图标",
"route": "路由",
"component": "组件名称",
"auth": "权限标识",
"sort": "排序",
"status": "状态",
"createTime": "创建时间"
}
}

View File

@@ -0,0 +1,17 @@
{
"search": {
"postName": "岗位名称",
"postCode": "岗位编码",
"status": "状态",
"placeholderPostName": "请输入岗位名称",
"placeholderPostCode": "请输入岗位编码",
"searchSelectPlaceholder": "请选择"
},
"table": {
"postName": "岗位名称",
"postCode": "岗位编码",
"sort": "排序",
"status": "状态",
"createTime": "创建时间"
}
}

View File

@@ -0,0 +1,18 @@
{
"search": {
"roleName": "角色名称",
"roleCode": "角色编码",
"status": "状态",
"placeholderRoleName": "请输入角色名称",
"placeholderRoleCode": "请输入角色编码",
"searchSelectPlaceholder": "请选择"
},
"table": {
"roleName": "角色名称",
"roleCode": "角色编码",
"level": "角色级别",
"roleRemark": "角色描述",
"status": "状态",
"createTime": "创建时间"
}
}

View File

@@ -0,0 +1,21 @@
{
"search": {
"username": "用户名",
"phone": "手机号",
"status": "状态",
"placeholderUsername": "请输入用户名",
"placeholderPhone": "请输入手机号",
"searchSelectPlaceholder": "请选择"
},
"table": {
"username": "用户名",
"phone": "手机号",
"dept": "部门",
"dashboard": "首页",
"loginTime": "上次登录",
"agentId": "代理ID",
"status": "状态",
"createTime": "创建时间",
"updateTime": "更新时间"
}
}

View File

@@ -0,0 +1,20 @@
{
"search": {
"tableName": "表名称",
"placeholderTableName": "请输入数据表名称",
"placeholderDataSource": "请输入数据源名称"
},
"table": {
"tableName": "表名称",
"tableDesc": "表描述",
"tableComment": "表注释",
"engine": "引擎",
"collation": "编码",
"template": "应用类型",
"namespace": "应用名称",
"stub": "模板类型",
"tplCategory": "生成类型",
"updateTime": "更新时间",
"createTime": "创建时间"
}
}

View File

@@ -0,0 +1,21 @@
{
"search": {
"taskName": "任务名称",
"taskType": "任务类型",
"status": "状态",
"placeholderTaskName": "请输入任务名称",
"searchSelectPlaceholder": "请选择"
},
"table": {
"no": "编号",
"taskName": "任务名称",
"taskType": "任务类型",
"rule": "定时规则",
"target": "调用目标",
"status": "状态",
"updateDate": "更新日期",
"executeTime": "执行时间",
"parameter": "任务参数",
"executeStatus": "执行状态"
}
}

View File

@@ -0,0 +1,84 @@
/**
* 按路由加载页面级翻译到 page 命名空间
* 路由 /dice/lottery_pool_config/index -> 加载 langs/{locale}/dice/lottery_pool_config.json
*/
import i18n from '@/locales'
import { LanguageEnum } from '@/enums/appEnum'
/** 路由 path 到 locale 文件路径的映射(无前导斜杠、无 /index */
export function getPageLocalePath(routePath: string): string | null {
if (!routePath || routePath === '/') return null
const normalized = routePath.replace(/\?.*$/, '').replace(/#.*$/, '').replace(/\/$/, '')
const withoutIndex = normalized.replace(/\/index$/i, '') || '/'
const path = withoutIndex.replace(/^\//, '') || ''
if (!path) return null
return path
}
type PageLocaleModule = { default: Record<string, unknown> }
const enModules = import.meta.glob<PageLocaleModule>('./langs/en/**/*.json')
const zhModules = import.meta.glob<PageLocaleModule>('./langs/zh/**/*.json')
function getModuleKey(locale: string, path: string): string {
return `./langs/${locale}/${path}.json`
}
let lastLoadedPath: string | null = null
let lastLoadedLocale: string | null = null
/**
* 加载并合并页面翻译到 i18n 的 page 命名空间
*/
export async function loadPageLocale(routePath: string): Promise<void> {
const path = getPageLocalePath(routePath)
if (!path) {
clearPageLocale()
return
}
const locale = i18n.global.locale.value
const key = getModuleKey(locale, path)
const modules = locale === LanguageEnum.EN ? enModules : zhModules
const loader = modules[key]
if (!loader) {
clearPageLocale()
return
}
if (lastLoadedPath === path && lastLoadedLocale === locale) {
return
}
try {
const mod = await loader()
const message = mod?.default
if (message && typeof message === 'object') {
i18n.global.mergeLocaleMessage(locale, { page: message })
lastLoadedPath = path
lastLoadedLocale = locale
}
} catch {
clearPageLocale()
}
}
/**
* 清除 page 命名空间(进入无页面翻译的路由时调用)
*/
export function clearPageLocale(): void {
const locale = i18n.global.locale.value
const messages = i18n.global.getLocaleMessage(locale) as Record<string, unknown>
if (messages && 'page' in messages) {
const next = { ...messages }
delete next.page
i18n.global.setLocaleMessage(locale, next)
}
lastLoadedPath = null
lastLoadedLocale = null
}
/**
* 语言切换时清空缓存,下次进入页面会重新加载
*/
export function invalidatePageLocaleCache(): void {
lastLoadedPath = null
lastLoadedLocale = null
}

View File

@@ -44,6 +44,7 @@ import { useMenuStore } from '@/store/modules/menu'
import { useDictStore } from '@/store/modules/dict' import { useDictStore } from '@/store/modules/dict'
import { setWorktab } from '@/utils/navigation' import { setWorktab } from '@/utils/navigation'
import { setPageTitle } from '@/utils/router' import { setPageTitle } from '@/utils/router'
import { loadPageLocale } from '@/locales/pageLocaleLoader'
import { RoutesAlias } from '../routesAlias' import { RoutesAlias } from '../routesAlias'
import { staticRoutes } from '../routes/staticRoutes' import { staticRoutes } from '../routes/staticRoutes'
import { loadingService } from '@/utils/ui' import { loadingService } from '@/utils/ui'
@@ -190,6 +191,7 @@ async function handleRouteGuard(
if (to.matched.length > 0) { if (to.matched.length > 0) {
setWorktab(to) setWorktab(to)
setPageTitle(to) setPageTitle(to)
await loadPageLocale(to.path)
next() next()
return return
} }

View File

@@ -2,7 +2,7 @@
<div class="art-card h-105 p-4 box-border mb-5 max-sm:mb-4"> <div class="art-card h-105 p-4 box-border mb-5 max-sm:mb-4">
<div class="art-card-header"> <div class="art-card-header">
<div class="title"> <div class="title">
<h4>月度玩家充值汇总</h4> <h4>{{ $t('console.activeUser.title') }}</h4>
</div> </div>
</div> </div>
<ArtBarChart <ArtBarChart

View File

@@ -2,10 +2,10 @@
<ElRow :gutter="20" class="flex"> <ElRow :gutter="20" class="flex">
<ElCol :sm="12" :md="6" :lg="6"> <ElCol :sm="12" :md="6" :lg="6">
<div class="art-card relative flex flex-col justify-center h-35 px-5 mb-5 max-sm:mb-4"> <div class="art-card relative flex flex-col justify-center h-35 px-5 mb-5 max-sm:mb-4">
<span class="text-g-700 text-sm">玩家注册</span> <span class="text-g-700 text-sm">{{ $t('console.card.playerRegister') }}</span>
<ArtCountTo class="text-[26px] font-medium mt-2" :target="statData.player_count" :duration="1300" /> <ArtCountTo class="text-[26px] font-medium mt-2" :target="statData.player_count" :duration="1300" />
<div class="flex-c mt-1"> <div class="flex-c mt-1">
<span class="text-xs text-g-600">较上周</span> <span class="text-xs text-g-600">{{ $t('console.card.vsLastWeek') }}</span>
<span <span
class="ml-1 text-xs font-semibold" class="ml-1 text-xs font-semibold"
:class="changeClass(statData.player_count_change)" :class="changeClass(statData.player_count_change)"
@@ -22,7 +22,7 @@
</ElCol> </ElCol>
<ElCol :sm="12" :md="6" :lg="6"> <ElCol :sm="12" :md="6" :lg="6">
<div class="art-card relative flex flex-col justify-center h-35 px-5 mb-5 max-sm:mb-4"> <div class="art-card relative flex flex-col justify-center h-35 px-5 mb-5 max-sm:mb-4">
<span class="text-g-700 text-sm">玩家充值</span> <span class="text-g-700 text-sm">{{ $t('console.card.playerCharge') }}</span>
<ArtCountTo <ArtCountTo
class="text-[26px] font-medium mt-2" class="text-[26px] font-medium mt-2"
:target="statData.charge_amount" :target="statData.charge_amount"
@@ -30,7 +30,7 @@
:decimals="2" :decimals="2"
/> />
<div class="flex-c mt-1"> <div class="flex-c mt-1">
<span class="text-xs text-g-600">较上周</span> <span class="text-xs text-g-600">{{ $t('console.card.vsLastWeek') }}</span>
<span <span
class="ml-1 text-xs font-semibold" class="ml-1 text-xs font-semibold"
:class="changeClass(statData.charge_amount_change)" :class="changeClass(statData.charge_amount_change)"
@@ -47,7 +47,7 @@
</ElCol> </ElCol>
<ElCol :sm="12" :md="6" :lg="6"> <ElCol :sm="12" :md="6" :lg="6">
<div class="art-card relative flex flex-col justify-center h-35 px-5 mb-5 max-sm:mb-4"> <div class="art-card relative flex flex-col justify-center h-35 px-5 mb-5 max-sm:mb-4">
<span class="text-g-700 text-sm">玩家提现</span> <span class="text-g-700 text-sm">{{ $t('console.card.playerWithdraw') }}</span>
<ArtCountTo <ArtCountTo
class="text-[26px] font-medium mt-2" class="text-[26px] font-medium mt-2"
:target="statData.withdraw_amount" :target="statData.withdraw_amount"
@@ -55,7 +55,7 @@
:decimals="2" :decimals="2"
/> />
<div class="flex-c mt-1"> <div class="flex-c mt-1">
<span class="text-xs text-g-600">较上周</span> <span class="text-xs text-g-600">{{ $t('console.card.vsLastWeek') }}</span>
<span <span
class="ml-1 text-xs font-semibold" class="ml-1 text-xs font-semibold"
:class="changeClass(statData.withdraw_amount_change)" :class="changeClass(statData.withdraw_amount_change)"
@@ -72,14 +72,14 @@
</ElCol> </ElCol>
<ElCol :sm="12" :md="6" :lg="6"> <ElCol :sm="12" :md="6" :lg="6">
<div class="art-card relative flex flex-col justify-center h-35 px-5 mb-5 max-sm:mb-4"> <div class="art-card relative flex flex-col justify-center h-35 px-5 mb-5 max-sm:mb-4">
<span class="text-g-700 text-sm">玩家游玩次数</span> <span class="text-g-700 text-sm">{{ $t('console.card.playerPlayCount') }}</span>
<ArtCountTo <ArtCountTo
class="text-[26px] font-medium mt-2" class="text-[26px] font-medium mt-2"
:target="statData.play_count" :target="statData.play_count"
:duration="1300" :duration="1300"
/> />
<div class="flex-c mt-1"> <div class="flex-c mt-1">
<span class="text-xs text-g-600">较上周</span> <span class="text-xs text-g-600">{{ $t('console.card.vsLastWeek') }}</span>
<span <span
class="ml-1 text-xs font-semibold" class="ml-1 text-xs font-semibold"
:class="changeClass(statData.play_count_change)" :class="changeClass(statData.play_count_change)"

View File

@@ -2,8 +2,8 @@
<div class="art-card h-128 p-5 mb-5 max-sm:mb-4"> <div class="art-card h-128 p-5 mb-5 max-sm:mb-4">
<div class="art-card-header"> <div class="art-card-header">
<div class="title"> <div class="title">
<h4>动态</h4> <h4>{{ $t('console.dynamic.title') }}</h4>
<p>新增<span class="text-success">+6</span></p> <p>{{ $t('console.dynamic.newCount') }}<span class="text-success">+6</span></p>
</div> </div>
</div> </div>

View File

@@ -2,8 +2,8 @@
<div class="art-card p-5 overflow-hidden mb-5 max-sm:mb-4"> <div class="art-card p-5 overflow-hidden mb-5 max-sm:mb-4">
<div class="art-card-header mb-4"> <div class="art-card-header mb-4">
<div class="title"> <div class="title">
<h4>新增玩家</h4> <h4>{{ $t('console.newPlayer.title') }}</h4>
<p class="text-g-600 text-sm mt-1">最新50条新增玩家记录</p> <p class="text-g-600 text-sm mt-1">{{ $t('console.newPlayer.subtitle') }}</p>
</div> </div>
</div> </div>
<ArtTable <ArtTable
@@ -16,13 +16,13 @@
:header-cell-style="{ background: 'transparent' }" :header-cell-style="{ background: 'transparent' }"
> >
<template #default> <template #default>
<ElTableColumn label="玩家" prop="name" min-width="120" align="center" /> <ElTableColumn :label="$t('console.newPlayer.player')" prop="name" min-width="120" align="center" />
<ElTableColumn label="余额" prop="coin" min-width="120" align="center"> <ElTableColumn :label="$t('console.newPlayer.balance')" prop="coin" min-width="120" align="center">
<template #default="scope"> <template #default="scope">
{{ formatCoin(scope.row.coin) }} {{ formatCoin(scope.row.coin) }}
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn label="抽奖券" prop="total_ticket_count" min-width="100" align="center" /> <ElTableColumn :label="$t('console.newPlayer.ticket')" prop="total_ticket_count" min-width="100" align="center" />
</template> </template>
</ArtTable> </ArtTable>
</div> </div>

View File

@@ -2,13 +2,13 @@
<div class="art-card p-5 h-128 overflow-hidden mb-5 max-sm:mb-4"> <div class="art-card p-5 h-128 overflow-hidden mb-5 max-sm:mb-4">
<div class="art-card-header"> <div class="art-card-header">
<div class="title"> <div class="title">
<h4>新用户</h4> <h4>{{ $t('console.newUser.title') }}</h4>
<p>这个月增长<span class="text-success">+20%</span></p> <p>{{ $t('console.newUser.growth') }}<span class="text-success">+20%</span></p>
</div> </div>
<ElRadioGroup v-model="radio2"> <ElRadioGroup v-model="radio2">
<ElRadioButton value="本月" label="本月"></ElRadioButton> <ElRadioButton label="thisMonth">{{ $t('console.newUser.thisMonth') }}</ElRadioButton>
<ElRadioButton value="上月" label="上月"></ElRadioButton> <ElRadioButton label="lastMonth">{{ $t('console.newUser.lastMonth') }}</ElRadioButton>
<ElRadioButton value="今年" label="今年"></ElRadioButton> <ElRadioButton label="thisYear">{{ $t('console.newUser.thisYear') }}</ElRadioButton>
</ElRadioGroup> </ElRadioGroup>
</div> </div>
<ArtTable <ArtTable
@@ -21,7 +21,7 @@
:header-cell-style="{ background: 'transparent' }" :header-cell-style="{ background: 'transparent' }"
> >
<template #default> <template #default>
<ElTableColumn label="头像" prop="avatar" width="150px"> <ElTableColumn :label="$t('console.newUser.avatar')" prop="avatar" width="150px">
<template #default="scope"> <template #default="scope">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<img class="size-9 rounded-lg" :src="scope.row.avatar" alt="avatar" /> <img class="size-9 rounded-lg" :src="scope.row.avatar" alt="avatar" />
@@ -29,15 +29,15 @@
</div> </div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn label="地区" prop="province" /> <ElTableColumn :label="$t('console.newUser.region')" prop="province" />
<ElTableColumn label="性别" prop="avatar"> <ElTableColumn :label="$t('console.newUser.gender')" prop="avatar">
<template #default="scope"> <template #default="scope">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<span style="margin-left: 10px">{{ scope.row.sex === 1 ? '男' : '女' }}</span> <span style="margin-left: 10px">{{ scope.row.sex === 1 ? $t('console.newUser.male') : $t('console.newUser.female') }}</span>
</div> </div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn label="进度" width="240"> <ElTableColumn :label="$t('console.newUser.progress')" width="240">
<template #default="scope"> <template #default="scope">
<ElProgress <ElProgress
:percentage="scope.row.pro" :percentage="scope.row.pro"
@@ -73,7 +73,7 @@
const ANIMATION_DELAY = 100 const ANIMATION_DELAY = 100
const radio2 = ref('本月') const radio2 = ref('thisMonth')
/** /**
* 新用户表格数据 * 新用户表格数据

View File

@@ -2,7 +2,7 @@
<div class="art-card h-105 p-5 mb-5 max-sm:mb-4"> <div class="art-card h-105 p-5 mb-5 max-sm:mb-4">
<div class="art-card-header"> <div class="art-card-header">
<div class="title"> <div class="title">
<h4>近期玩家充值统计</h4> <h4>{{ $t('console.salesOverview.title') }}</h4>
</div> </div>
</div> </div>
<ArtLineChart <ArtLineChart

View File

@@ -2,8 +2,8 @@
<div class="art-card h-128 p-5 mb-5 max-sm:mb-4"> <div class="art-card h-128 p-5 mb-5 max-sm:mb-4">
<div class="art-card-header"> <div class="art-card-header">
<div class="title"> <div class="title">
<h4>代办事项</h4> <h4>{{ $t('console.todo.title') }}</h4>
<p>待处理<span class="text-danger">3</span></p> <p>{{ $t('console.todo.pending') }}<span class="text-danger">3</span></p>
</div> </div>
</div> </div>

View File

@@ -2,8 +2,8 @@
<div class="art-card p-5 overflow-hidden mb-5 max-sm:mb-4"> <div class="art-card p-5 overflow-hidden mb-5 max-sm:mb-4">
<div class="art-card-header mb-4"> <div class="art-card-header mb-4">
<div class="title"> <div class="title">
<h4>玩家充值记录</h4> <h4>{{ $t('console.walletRecord.title') }}</h4>
<p class="text-g-600 text-sm mt-1">最新50条充值记录</p> <p class="text-g-600 text-sm mt-1">{{ $t('console.walletRecord.subtitle') }}</p>
</div> </div>
</div> </div>
<ArtTable <ArtTable
@@ -16,13 +16,13 @@
:header-cell-style="{ background: 'transparent' }" :header-cell-style="{ background: 'transparent' }"
> >
<template #default> <template #default>
<ElTableColumn label="玩家" prop="player_name" min-width="120" align="center" /> <ElTableColumn :label="$t('console.walletRecord.player')" prop="player_name" min-width="120" align="center" />
<ElTableColumn label="充值金额" prop="coin" min-width="120" align="center"> <ElTableColumn :label="$t('console.walletRecord.chargeAmount')" prop="coin" min-width="120" align="center">
<template #default="scope"> <template #default="scope">
{{ formatCoin(scope.row.coin) }} {{ formatCoin(scope.row.coin) }}
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn label="充值时间" prop="create_time" min-width="170" align="center" /> <ElTableColumn :label="$t('console.walletRecord.chargeTime')" prop="create_time" min-width="170" align="center" />
</template> </template>
</ArtTable> </ArtTable>
</div> </div>

View File

@@ -109,12 +109,12 @@
apiFn: api.list, apiFn: api.list,
columnsFactory: () => [ columnsFactory: () => [
// { type: 'selection' }, // { type: 'selection' },
{ prop: 'group', label: 'table.columns.system.group', minWidth: 140, align: 'center' }, { prop: 'group', label: 'page.table.group', minWidth: 140, align: 'center' },
{ prop: 'title', label: 'table.columns.system.title', minWidth: 160, align: 'center' }, { prop: 'title', label: 'page.table.title', minWidth: 160, align: 'center' },
{ prop: 'title_en', label: 'table.columns.system.titleEn', minWidth: 160, align: 'center' }, { prop: 'title_en', label: 'page.table.titleEn', minWidth: 160, align: 'center' },
{ prop: 'name', label: 'table.columns.system.configName', align: 'center' }, { prop: 'name', label: 'page.table.configName', align: 'center' },
{ prop: 'value', label: 'table.columns.system.value', minWidth: 240, align: 'center' }, { prop: 'value', label: 'page.table.value', minWidth: 240, align: 'center' },
{ prop: 'value_en', label: 'table.columns.system.valueEn', minWidth: 240, align: 'center' }, { prop: 'value_en', label: 'page.table.valueEn', minWidth: 240, align: 'center' },
{ {
prop: 'operation', prop: 'operation',
label: 'table.actions.operation', label: 'table.actions.operation',

View File

@@ -9,18 +9,18 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.group')" prop="group"> <el-form-item :label="$t('page.search.group')" prop="group">
<el-input v-model="formData.group" :placeholder="$t('table.searchBar.placeholderGroup')" clearable /> <el-input v-model="formData.group" :placeholder="$t('page.search.placeholderGroup')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.title')" prop="title"> <el-form-item :label="$t('page.search.title')" prop="title">
<el-input v-model="formData.title" :placeholder="$t('table.searchBar.placeholderTitle')" clearable /> <el-input v-model="formData.title" :placeholder="$t('page.search.placeholderTitle')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.configName')" prop="name"> <el-form-item :label="$t('page.search.configName')" prop="name">
<el-input v-model="formData.name" :placeholder="$t('table.searchBar.placeholderConfigName')" clearable /> <el-input v-model="formData.name" :placeholder="$t('page.search.placeholderConfigName')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</sa-search-bar> </sa-search-bar>

View File

@@ -12,7 +12,7 @@
type="primary" type="primary"
@click="showCurrentPoolDialog" @click="showCurrentPoolDialog"
> >
查看当前彩金池 {{ $t('page.toolbar.viewCurrentPool') }}
</ElButton> </ElButton>
</template> </template>
</ArtTableHeader> </ArtTableHeader>
@@ -61,12 +61,14 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { useTable } from '@/hooks/core/useTable' import { useTable } from '@/hooks/core/useTable'
import { useSaiAdmin } from '@/composables/useSaiAdmin' import { useSaiAdmin } from '@/composables/useSaiAdmin'
import api from '../../api/lottery_pool_config/index' import api from '../../api/lottery_pool_config/index'
import TableSearch from './modules/table-search.vue' import TableSearch from './modules/table-search.vue'
import EditDialog from './modules/edit-dialog.vue' import EditDialog from './modules/edit-dialog.vue'
import CurrentPoolDialog from './modules/current-pool-dialog.vue' import CurrentPoolDialog from './modules/current-pool-dialog.vue'
const { t } = useI18n()
// 搜索表单 // 搜索表单
const searchForm = ref({ const searchForm = ref({
@@ -82,7 +84,7 @@
// 奖池类型展示0=正常 1=强制杀猪 2=T1高倍率 // 奖池类型展示0=正常 1=强制杀猪 2=T1高倍率
const typeFormatter = (row: Record<string, unknown>) => const typeFormatter = (row: Record<string, unknown>) =>
row.type === 0 ? '正常' : row.type === 1 ? '强制杀猪' : row.type === 2 ? 'T1高倍率' : '-' row.type === 0 ? t('page.search.poolTypeNormal') : row.type === 1 ? t('page.search.poolTypeKill') : row.type === 2 ? t('page.search.poolTypeT1') : '-'
// 权重列带 % // 权重列带 %
const weightFormatter = (prop: string) => (row: Record<string, unknown>) => { const weightFormatter = (prop: string) => (row: Record<string, unknown>) => {
@@ -108,40 +110,40 @@
core: { core: {
apiFn: api.list, apiFn: api.list,
columnsFactory: () => [ columnsFactory: () => [
{ prop: 'name', label: 'table.columns.common.name', align: 'center' }, { prop: 'name', label: 'page.table.name', align: 'center' },
{ prop: 'type', label: 'table.columns.dice.poolType', width: 100, align: 'center', formatter: typeFormatter }, { prop: 'type', label: 'page.table.poolType', width: 100, align: 'center', formatter: typeFormatter },
{ prop: 'safety_line', label: 'table.columns.dice.safetyLine', align: 'center' }, { prop: 'safety_line', label: 'page.table.safetyLine', align: 'center' },
{ {
prop: 't1_weight', prop: 't1_weight',
label: 'table.columns.dice.t1PoolWeight', label: 'page.table.t1PoolWeight',
width: 100, width: 100,
align: 'center', align: 'center',
formatter: weightFormatter('t1_weight') formatter: weightFormatter('t1_weight')
}, },
{ {
prop: 't2_weight', prop: 't2_weight',
label: 'table.columns.dice.t2PoolWeight', label: 'page.table.t2PoolWeight',
width: 100, width: 100,
align: 'center', align: 'center',
formatter: weightFormatter('t2_weight') formatter: weightFormatter('t2_weight')
}, },
{ {
prop: 't3_weight', prop: 't3_weight',
label: 'table.columns.dice.t3PoolWeight', label: 'page.table.t3PoolWeight',
width: 100, width: 100,
align: 'center', align: 'center',
formatter: weightFormatter('t3_weight') formatter: weightFormatter('t3_weight')
}, },
{ {
prop: 't4_weight', prop: 't4_weight',
label: 'table.columns.dice.t4PoolWeight', label: 'page.table.t4PoolWeight',
width: 100, width: 100,
align: 'center', align: 'center',
formatter: weightFormatter('t4_weight') formatter: weightFormatter('t4_weight')
}, },
{ {
prop: 't5_weight', prop: 't5_weight',
label: 'table.columns.dice.t5PoolWeight', label: 'page.table.t5PoolWeight',
width: 100, width: 100,
align: 'center', align: 'center',
formatter: weightFormatter('t5_weight') formatter: weightFormatter('t5_weight')

View File

@@ -9,16 +9,16 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.common.name')" prop="name"> <el-form-item :label="$t('page.name')" prop="name">
<el-input v-model="formData.name" :placeholder="$t('table.searchBar.placeholderName')" clearable /> <el-input v-model="formData.name" :placeholder="$t('page.search.placeholderName')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.poolType')" prop="type"> <el-form-item :label="$t('page.search.poolType')" prop="type">
<el-select <el-select
v-model="formData.type" v-model="formData.type"
:options="typeOptions" :options="typeOptions"
:placeholder="$t('table.searchBar.placeholderPoolType')" :placeholder="$t('page.search.placeholderPoolType')"
clearable clearable
/> />
</el-form-item> </el-form-item>
@@ -27,6 +27,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useI18n } from 'vue-i18n'
interface Props { interface Props {
modelValue: Record<string, any> modelValue: Record<string, any>
} }
@@ -40,11 +41,12 @@
// 展开/收起 // 展开/收起
const isExpanded = ref<boolean>(false) const isExpanded = ref<boolean>(false)
const typeOptions = [ const { t } = useI18n()
{ name: '0', value: '正常' }, const typeOptions = computed(() => [
{ name: '1', value: '强制杀猪' }, { name: '0', value: t('page.search.poolTypeNormal') },
{ name: '2', value: 'T1高倍率' } { name: '1', value: t('page.search.poolTypeKill') },
] { name: '2', value: t('page.search.poolTypeT1') }
])
// 表单数据双向绑定 // 表单数据双向绑定
const searchBarRef = ref() const searchBarRef = ref()
const formData = computed({ const formData = computed({

View File

@@ -53,19 +53,19 @@
<!-- 抽奖类型 tag --> <!-- 抽奖类型 tag -->
<template #lottery_type="{ row }"> <template #lottery_type="{ row }">
<ElTag size="small" :type="row.lottery_type === 0 ? 'warning' : 'success'"> <ElTag size="small" :type="row.lottery_type === 0 ? 'warning' : 'success'">
{{ row.lottery_type === 0 ? '付费' : row.lottery_type === 1 ? '赠送' : '-' }} {{ row.lottery_type === 0 ? t('page.search.paid') : row.lottery_type === 1 ? t('page.search.free') : '-' }}
</ElTag> </ElTag>
</template> </template>
<!-- 是否中大奖 tag --> <!-- 是否中大奖 tag -->
<template #is_win="{ row }"> <template #is_win="{ row }">
<ElTag size="small" :type="row.is_win === 1 ? 'success' : 'info'"> <ElTag size="small" :type="row.is_win === 1 ? 'success' : 'info'">
{{ row.is_win === 0 ? '无' : row.is_win === 1 ? '中大奖' : '-' }} {{ row.is_win === 0 ? t('page.search.noBigWin') : row.is_win === 1 ? t('page.search.bigWin') : '-' }}
</ElTag> </ElTag>
</template> </template>
<!-- 方向 tag --> <!-- 方向 tag -->
<template #direction="{ row }"> <template #direction="{ row }">
<ElTag size="small" :type="row.direction === 0 ? 'primary' : 'warning'"> <ElTag size="small" :type="row.direction === 0 ? 'primary' : 'warning'">
{{ row.direction === 0 ? '顺时针' : row.direction === 1 ? '逆时针' : '-' }} {{ row.direction === 0 ? t('page.search.clockwise') : row.direction === 1 ? t('page.search.anticlockwise') : '-' }}
</ElTag> </ElTag>
</template> </template>
<!-- 摇取点数 tag --> <!-- 摇取点数 tag -->
@@ -103,11 +103,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { useTable } from '@/hooks/core/useTable' import { useTable } from '@/hooks/core/useTable'
import { useSaiAdmin } from '@/composables/useSaiAdmin' import { useSaiAdmin } from '@/composables/useSaiAdmin'
import api from '../../api/play_record/index' import api from '../../api/play_record/index'
import TableSearch from './modules/table-search.vue' import TableSearch from './modules/table-search.vue'
import EditDialog from './modules/edit-dialog.vue' import EditDialog from './modules/edit-dialog.vue'
const { t } = useI18n()
// 搜索表单 // 搜索表单
const searchForm = ref<Record<string, unknown>>({ const searchForm = ref<Record<string, unknown>>({
@@ -171,35 +173,35 @@
apiFn: api.list, apiFn: api.list,
columnsFactory: () => [ columnsFactory: () => [
// { type: 'selection' }, // { type: 'selection' },
{ prop: 'id', label: 'table.columns.common.id', width: 80 }, { prop: 'id', label: 'page.table.id', width: 80 },
{ {
prop: 'player_id', prop: 'player_id',
label: 'table.columns.dice.player', label: 'page.table.player',
formatter: (row: Record<string, any>) => usernameFormatter(row) formatter: (row: Record<string, any>) => usernameFormatter(row)
}, },
{ {
prop: 'lottery_config_id', prop: 'lottery_config_id',
label: 'table.columns.dice.lotteryPoolConfig', label: 'page.table.lotteryPoolConfig',
width: 120, width: 120,
useSlot: true useSlot: true
}, },
{ prop: 'lottery_type', label: 'table.columns.dice.drawType', width: 100, useSlot: true }, { prop: 'lottery_type', label: 'page.table.drawType', width: 100, useSlot: true },
{ prop: 'is_win', label: 'table.columns.dice.isBigWin', width: 100, useSlot: true }, { prop: 'is_win', label: 'page.table.isBigWin', width: 100, useSlot: true },
{ prop: 'win_coin', label: 'table.columns.dice.winCoin', width: 110 }, { prop: 'win_coin', label: 'page.table.winCoin', width: 110 },
{ prop: 'super_win_coin', label: 'table.columns.dice.superWinCoin', width: 120 }, { prop: 'super_win_coin', label: 'page.table.superWinCoin', width: 120 },
{ prop: 'reward_win_coin', label: 'table.columns.dice.rewardWinCoin', width: 140 }, { prop: 'reward_win_coin', label: 'page.table.rewardWinCoin', width: 140 },
{ prop: 'direction', label: 'table.columns.dice.direction', width: 90, useSlot: true }, { prop: 'direction', label: 'page.table.direction', width: 90, useSlot: true },
{ prop: 'start_index', label: 'table.columns.dice.startIndex', width: 90 }, { prop: 'start_index', label: 'page.table.startIndex', width: 90 },
{ prop: 'target_index', label: 'table.columns.dice.targetIndex', width: 90 }, { prop: 'target_index', label: 'page.table.targetIndex', width: 90 },
{ prop: 'roll_array', label: 'table.columns.dice.rollArray', width: 140, useSlot: true }, { prop: 'roll_array', label: 'page.table.rollArray', width: 140, useSlot: true },
{ prop: 'roll_number', label: 'table.columns.dice.rollNumber', width: 110, sortable: true }, { prop: 'roll_number', label: 'page.table.rollNumber', width: 110, sortable: true },
{ {
prop: 'reward_config_id', prop: 'reward_config_id',
label: 'table.columns.dice.rewardConfig', label: 'page.table.rewardConfig',
formatter: (row: Record<string, any>) => rewardTierFormatter(row) formatter: (row: Record<string, any>) => rewardTierFormatter(row)
}, },
{ prop: 'create_time', label: 'table.columns.common.createTime', width: 170 }, { prop: 'create_time', label: 'page.table.createTime', width: 170 },
{ prop: 'update_time', label: 'table.columns.common.updateTime', width: 170 }, { prop: 'update_time', label: 'page.table.updateTime', width: 170 },
{ prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -9,41 +9,41 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.player')" prop="username"> <el-form-item :label="$t('page.search.player')" prop="username">
<el-input v-model="formData.username" :placeholder="$t('table.searchBar.usernameFuzzy')" clearable /> <el-input v-model="formData.username" :placeholder="$t('page.search.usernameFuzzy')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.lotteryPoolConfig')" prop="lottery_config_name"> <el-form-item :label="$t('page.search.lotteryPoolConfig')" prop="lottery_config_name">
<el-input v-model="formData.lottery_config_name" :placeholder="$t('table.searchBar.nameFuzzy')" clearable /> <el-input v-model="formData.lottery_config_name" :placeholder="$t('page.search.nameFuzzy')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.drawType')" prop="lottery_type"> <el-form-item :label="$t('page.search.drawType')" prop="lottery_type">
<el-select v-model="formData.lottery_type" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.lottery_type" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="付费" :value="0" /> <el-option :label="$t('page.search.paid')" :value="0" />
<el-option label="赠送" :value="1" /> <el-option :label="$t('page.search.free')" :value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.isBigWin')" prop="is_win"> <el-form-item :label="$t('page.search.isBigWin')" prop="is_win">
<el-select v-model="formData.is_win" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.is_win" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="" :value="0" /> <el-option :label="$t('page.search.noBigWin')" :value="0" />
<el-option label="中大奖" :value="1" /> <el-option :label="$t('page.search.bigWin')" :value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.direction')" prop="direction"> <el-form-item :label="$t('page.search.direction')" prop="direction">
<el-select v-model="formData.direction" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.direction" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="顺时针" :value="0" /> <el-option :label="$t('page.search.clockwise')" :value="0" />
<el-option label="逆时针" :value="1" /> <el-option :label="$t('page.search.anticlockwise')" :value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.winCoin')" prop="win_coin_min"> <el-form-item :label="$t('page.search.winCoin')" prop="win_coin_min">
<div class="range-wrap"> <div class="range-wrap">
<el-input-number <el-input-number
v-model="formData.win_coin_min" v-model="formData.win_coin_min"
@@ -64,7 +64,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.rollNumber')" prop="roll_number_min"> <el-form-item :label="$t('page.search.rollNumber')" prop="roll_number_min">
<div class="range-wrap"> <div class="range-wrap">
<el-input-number <el-input-number
v-model="formData.roll_number_min" v-model="formData.roll_number_min"
@@ -89,12 +89,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.rewardConfig')" prop="reward_ui_text"> <el-form-item :label="$t('page.search.rewardConfig')" prop="reward_ui_text">
<el-input v-model="formData.reward_ui_text" :placeholder="$t('table.searchBar.uiTextFuzzy')" clearable /> <el-input v-model="formData.reward_ui_text" :placeholder="$t('page.search.uiTextFuzzy')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.rewardTier')" prop="reward_tier"> <el-form-item :label="$t('page.search.rewardTier')" prop="reward_tier">
<el-select v-model="formData.reward_tier" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.reward_tier" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="T1" value="T1" /> <el-option label="T1" value="T1" />
<el-option label="T2" value="T2" /> <el-option label="T2" value="T2" />

View File

@@ -8,7 +8,7 @@
<ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData"> <ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData">
<template #left> <template #left>
<span v-if="totalWinCoin !== null" class="table-summary-inline"> <span v-if="totalWinCoin !== null" class="table-summary-inline">
平台总盈利<strong>{{ totalWinCoin }}</strong> {{ $t('page.toolbar.platformTotalProfit') }}<strong>{{ totalWinCoin }}</strong>
</span> </span>
<ElSpace wrap class="table-toolbar-buttons"> <ElSpace wrap class="table-toolbar-buttons">
<ElButton <ElButton
@@ -20,7 +20,7 @@
<template #icon> <template #icon>
<ArtSvgIcon icon="ri:delete-bin-5-line" /> <ArtSvgIcon icon="ri:delete-bin-5-line" />
</template> </template>
删除 {{ $t('table.actions.delete') }}
</ElButton> </ElButton>
<ElButton <ElButton
v-permission="'dice:play_record_test:index:destroy'" v-permission="'dice:play_record_test:index:destroy'"
@@ -32,7 +32,7 @@
<template #icon> <template #icon>
<ArtSvgIcon icon="ri:delete-bin-2-line" /> <ArtSvgIcon icon="ri:delete-bin-2-line" />
</template> </template>
一键删除所有数据 {{ $t('page.toolbar.clearAllData') }}
</ElButton> </ElButton>
</ElSpace> </ElSpace>
</template> </template>
@@ -58,19 +58,19 @@
<!-- 抽奖类型 --> <!-- 抽奖类型 -->
<template #lottery_type="{ row }"> <template #lottery_type="{ row }">
<ElTag size="small" :type="row.lottery_type === 0 ? 'warning' : 'success'"> <ElTag size="small" :type="row.lottery_type === 0 ? 'warning' : 'success'">
{{ row.lottery_type === 0 ? '付费' : row.lottery_type === 1 ? '赠送' : '-' }} {{ row.lottery_type === 0 ? t('page.search.paid') : row.lottery_type === 1 ? t('page.search.free') : '-' }}
</ElTag> </ElTag>
</template> </template>
<!-- 是否中大奖 --> <!-- 是否中大奖 -->
<template #is_win="{ row }"> <template #is_win="{ row }">
<ElTag size="small" :type="row.is_win === 1 ? 'success' : 'info'"> <ElTag size="small" :type="row.is_win === 1 ? 'success' : 'info'">
{{ row.is_win === 0 ? '无' : row.is_win === 1 ? '中大奖' : '-' }} {{ row.is_win === 0 ? t('page.search.noBigWin') : row.is_win === 1 ? t('page.search.bigWin') : '-' }}
</ElTag> </ElTag>
</template> </template>
<!-- 方向 --> <!-- 方向 -->
<template #direction="{ row }"> <template #direction="{ row }">
<ElTag size="small" :type="row.direction === 0 ? 'primary' : 'warning'"> <ElTag size="small" :type="row.direction === 0 ? 'primary' : 'warning'">
{{ row.direction === 0 ? '顺时针' : row.direction === 1 ? '逆时针' : '-' }} {{ row.direction === 0 ? t('page.search.clockwise') : row.direction === 1 ? t('page.search.anticlockwise') : '-' }}
</ElTag> </ElTag>
</template> </template>
<!-- 摇取点数 --> <!-- 摇取点数 -->
@@ -86,7 +86,7 @@
<!-- 状态 --> <!-- 状态 -->
<template #status="{ row }"> <template #status="{ row }">
<ElTag size="small" :type="row.status === 1 ? 'success' : 'info'"> <ElTag size="small" :type="row.status === 1 ? 'success' : 'info'">
{{ row.status === 1 ? '成功' : '失败' }} {{ row.status === 1 ? t('table.searchBar.success') : t('table.searchBar.failure') }}
</ElTag> </ElTag>
</template> </template>
<!-- 操作列 --> <!-- 操作列 -->
@@ -118,12 +118,14 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { useTable } from '@/hooks/core/useTable' import { useTable } from '@/hooks/core/useTable'
import { useSaiAdmin } from '@/composables/useSaiAdmin' import { useSaiAdmin } from '@/composables/useSaiAdmin'
import api from '../../api/play_record_test/index' import api from '../../api/play_record_test/index'
import TableSearch from './modules/table-search.vue' import TableSearch from './modules/table-search.vue'
import EditDialog from './modules/edit-dialog.vue' import EditDialog from './modules/edit-dialog.vue'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
const { t } = useI18n()
// 搜索表单(与 play_record 对齐:方向、赢取平台币范围、是否中大奖、中奖档位、点数和) // 搜索表单(与 play_record 对齐:方向、赢取平台币范围、是否中大奖、中奖档位、点数和)
const searchForm = ref<Record<string, unknown>>({ const searchForm = ref<Record<string, unknown>>({
@@ -205,21 +207,21 @@
apiFn: listApi, apiFn: listApi,
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'id', label: 'table.columns.common.id', width: 80 }, { prop: 'id', label: 'page.table.id', width: 80 },
{ prop: 'lottery_config_id', label: 'table.columns.dice.lotteryPoolConfig', width: 120, useSlot: true }, { prop: 'lottery_config_id', label: 'page.table.lotteryPoolConfig', width: 120, useSlot: true },
{ prop: 'lottery_type', label: 'table.columns.dice.drawType', width: 100, useSlot: true }, { prop: 'lottery_type', label: 'page.table.drawType', width: 100, useSlot: true },
{ prop: 'is_win', label: 'table.columns.dice.isBigWin', width: 100, useSlot: true }, { prop: 'is_win', label: 'page.table.isBigWin', width: 100, useSlot: true },
{ prop: 'win_coin', label: 'table.columns.dice.winCoin', width: 110 }, { prop: 'win_coin', label: 'page.table.winCoin', width: 110 },
{ prop: 'super_win_coin', label: 'table.columns.dice.superWinCoin', width: 120 }, { prop: 'super_win_coin', label: 'page.table.superWinCoin', width: 120 },
{ prop: 'reward_win_coin', label: 'table.columns.dice.rewardWinCoin', width: 140 }, { prop: 'reward_win_coin', label: 'page.table.rewardWinCoin', width: 140 },
{ prop: 'direction', label: 'table.columns.dice.direction', width: 90, useSlot: true }, { prop: 'direction', label: 'page.table.direction', width: 90, useSlot: true },
{ prop: 'start_index', label: 'table.columns.dice.startIndex', width: 90 }, { prop: 'start_index', label: 'page.table.startIndex', width: 90 },
{ prop: 'target_index', label: 'table.columns.dice.targetIndex', width: 90 }, { prop: 'target_index', label: 'page.table.targetIndex', width: 90 },
{ prop: 'roll_array', label: 'table.columns.dice.rollArray', width: 140, useSlot: true }, { prop: 'roll_array', label: 'page.table.rollArray', width: 140, useSlot: true },
{ prop: 'roll_number', label: 'table.columns.dice.rollNumber', width: 110, sortable: true }, { prop: 'roll_number', label: 'page.table.rollNumber', width: 110, sortable: true },
{ prop: 'reward_config_id', label: 'table.columns.dice.rewardTier', width: 100, useSlot: true }, { prop: 'reward_config_id', label: 'page.table.rewardConfig', width: 100, useSlot: true },
{ prop: 'status', label: 'table.columns.common.status', width: 80, useSlot: true }, { prop: 'status', label: 'page.table.status', width: 80, useSlot: true },
{ prop: 'create_time', label: 'table.columns.common.createTime', width: 170 }, { prop: 'create_time', label: 'page.table.createTime', width: 170 },
{ prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -9,31 +9,31 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.drawType')" prop="lottery_type"> <el-form-item :label="$t('page.search.drawType')" prop="lottery_type">
<el-select v-model="formData.lottery_type" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.lottery_type" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="付费" :value="0" /> <el-option :label="$t('page.search.paid')" :value="0" />
<el-option label="赠送" :value="1" /> <el-option :label="$t('page.search.free')" :value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.direction')" prop="direction"> <el-form-item :label="$t('page.search.direction')" prop="direction">
<el-select v-model="formData.direction" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.direction" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="顺时针" :value="0" /> <el-option :label="$t('page.search.clockwise')" :value="0" />
<el-option label="逆时针" :value="1" /> <el-option :label="$t('page.search.anticlockwise')" :value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.isBigWin')" prop="is_win"> <el-form-item :label="$t('page.search.isBigWin')" prop="is_win">
<el-select v-model="formData.is_win" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.is_win" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="" :value="0" /> <el-option :label="$t('page.search.noBigWin')" :value="0" />
<el-option label="中大奖" :value="1" /> <el-option :label="$t('page.search.bigWin')" :value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.winCoin')" prop="win_coin_min"> <el-form-item :label="$t('page.search.winCoin')" prop="win_coin_min">
<div class="range-wrap"> <div class="range-wrap">
<el-input-number <el-input-number
v-model="formData.win_coin_min" v-model="formData.win_coin_min"
@@ -54,7 +54,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.rewardTier')" prop="reward_tier"> <el-form-item :label="$t('page.search.rewardTier')" prop="reward_tier">
<el-select v-model="formData.reward_tier" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.reward_tier" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="T1" value="T1" /> <el-option label="T1" value="T1" />
<el-option label="T2" value="T2" /> <el-option label="T2" value="T2" />
@@ -65,7 +65,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.rollNumber')" prop="roll_number"> <el-form-item :label="$t('page.search.rollNumber')" prop="roll_number">
<el-select <el-select
v-model="formData.roll_number" v-model="formData.roll_number"
:placeholder="$t('table.searchBar.all')" :placeholder="$t('table.searchBar.all')"

View File

@@ -150,70 +150,70 @@
apiFn: api.list, apiFn: api.list,
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'username', label: 'table.columns.system.username', align: 'center' }, { prop: 'username', label: 'page.table.username', align: 'center' },
{ prop: 'phone', label: 'table.columns.system.phone', align: 'center' }, { prop: 'phone', label: 'page.table.phone', align: 'center' },
{ prop: 'name', label: 'table.columns.dice.nickname', align: 'center' }, { prop: 'name', label: 'page.table.nickname', align: 'center' },
{ {
prop: 'status', prop: 'status',
label: 'table.columns.common.status', label: 'page.table.status',
width: 88, width: 88,
align: 'center', align: 'center',
useSlot: true useSlot: true
}, },
{ {
prop: 'coin', prop: 'coin',
label: 'table.columns.dice.coin', label: 'page.table.coin',
width: 100, width: 100,
align: 'center', align: 'center',
useSlot: true useSlot: true
}, },
{ {
prop: 'lottery_config_id', prop: 'lottery_config_id',
label: 'table.columns.dice.lotteryPoolConfig', label: 'page.table.lotteryPoolConfig',
width: 120, width: 120,
align: 'center', align: 'center',
formatter: (row: any) => lotteryConfigNameFormatter(row) formatter: (row: any) => lotteryConfigNameFormatter(row)
}, },
{ {
prop: 't1_weight', prop: 't1_weight',
label: 'table.columns.dice.t1Weight', label: 'page.table.t1Weight',
width: 80, width: 80,
align: 'center', align: 'center',
formatter: weightFormatter('t1_weight') formatter: weightFormatter('t1_weight')
}, },
{ {
prop: 't2_weight', prop: 't2_weight',
label: 'table.columns.dice.t2Weight', label: 'page.table.t2Weight',
width: 100, width: 100,
align: 'center', align: 'center',
formatter: weightFormatter('t2_weight') formatter: weightFormatter('t2_weight')
}, },
{ {
prop: 't3_weight', prop: 't3_weight',
label: 'table.columns.dice.t3Weight', label: 'page.table.t3Weight',
width: 100, width: 100,
align: 'center', align: 'center',
formatter: weightFormatter('t3_weight') formatter: weightFormatter('t3_weight')
}, },
{ {
prop: 't4_weight', prop: 't4_weight',
label: 'table.columns.dice.t4Weight', label: 'page.table.t4Weight',
width: 100, width: 100,
align: 'center', align: 'center',
formatter: weightFormatter('t4_weight') formatter: weightFormatter('t4_weight')
}, },
{ {
prop: 't5_weight', prop: 't5_weight',
label: 'table.columns.dice.t5Weight', label: 'page.table.t5Weight',
width: 100, width: 100,
align: 'center', align: 'center',
formatter: weightFormatter('t5_weight') formatter: weightFormatter('t5_weight')
}, },
{ prop: 'total_ticket_count', label: 'table.columns.dice.totalDrawCount', align: 'center' }, { prop: 'total_ticket_count', label: 'page.table.totalDrawCount', align: 'center' },
{ prop: 'paid_ticket_count', label: 'table.columns.dice.paidDrawCount', align: 'center' }, { prop: 'paid_ticket_count', label: 'page.table.paidDrawCount', align: 'center' },
{ prop: 'free_ticket_count', label: 'table.columns.dice.freeDrawCount', align: 'center' }, { prop: 'free_ticket_count', label: 'page.table.freeDrawCount', align: 'center' },
{ prop: 'create_time', label: 'table.columns.common.createTime', align: 'center' }, { prop: 'create_time', label: 'page.table.createTime', align: 'center' },
{ prop: 'update_time', label: 'table.columns.common.updateTime', align: 'center' }, { prop: 'update_time', label: 'page.table.updateTime', align: 'center' },
{ {
prop: 'operation', prop: 'operation',
label: 'table.actions.operation', label: 'table.actions.operation',

View File

@@ -9,22 +9,22 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.username')" prop="username"> <el-form-item :label="$t('page.search.username')" prop="username">
<el-input v-model="formData.username" :placeholder="$t('table.searchBar.placeholderUsername')" clearable /> <el-input v-model="formData.username" :placeholder="$t('page.search.placeholderUsername')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.nickname')" prop="name"> <el-form-item :label="$t('page.search.nickname')" prop="name">
<el-input v-model="formData.name" :placeholder="$t('table.searchBar.placeholderNickname')" clearable /> <el-input v-model="formData.name" :placeholder="$t('page.search.placeholderNickname')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.phone')" prop="phone"> <el-form-item :label="$t('page.search.phone')" prop="phone">
<el-input v-model="formData.phone" :placeholder="$t('table.searchBar.placeholderPhoneFuzzy')" clearable /> <el-input v-model="formData.phone" :placeholder="$t('page.search.placeholderPhoneFuzzy')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.common.status')" prop="status"> <el-form-item :label="$t('page.search.status')" prop="status">
<el-select v-model="formData.status" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.status" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option :label="$t('table.searchBar.enable')" :value="1" /> <el-option :label="$t('table.searchBar.enable')" :value="1" />
<el-option :label="$t('table.searchBar.disable')" :value="0" /> <el-option :label="$t('table.searchBar.disable')" :value="0" />
@@ -32,22 +32,22 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.coin')" prop="coin"> <el-form-item :label="$t('page.search.coin')" prop="coin">
<el-input-number <el-input-number
v-model="formData.coin" v-model="formData.coin"
:min="0" :min="0"
:precision="2" :precision="2"
:placeholder="$t('table.searchBar.exactSearch')" :placeholder="$t('page.search.exactSearch')"
controls-position="right" controls-position="right"
style="width: 100%" style="width: 100%"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.lotteryPoolConfig')" prop="lottery_config_id"> <el-form-item :label="$t('page.search.lotteryPoolConfig')" prop="lottery_config_id">
<el-select <el-select
v-model="formData.lottery_config_id" v-model="formData.lottery_config_id"
:placeholder="$t('table.searchBar.all')" :placeholder="$t('page.search.placeholderAll')"
clearable clearable
style="width: 100%" style="width: 100%"
> >

View File

@@ -127,19 +127,19 @@
row?.dicePlayer?.username ?? row?.player_id ?? '-' row?.dicePlayer?.username ?? row?.player_id ?? '-'
return [ return [
// { type: 'selection' }, // { type: 'selection' },
{ prop: 'id', label: 'table.columns.common.id', width: 80, align: 'center' }, { prop: 'id', label: 'page.table.id', width: 80, align: 'center' },
{ {
prop: 'player_id', prop: 'player_id',
label: 'table.columns.dice.playerUsername', label: 'page.table.playerUsername',
align: 'center', align: 'center',
formatter: (row: Record<string, any>) => usernameFormatter(row) formatter: (row: Record<string, any>) => usernameFormatter(row)
}, },
{ prop: 'use_coins', label: 'table.columns.dice.useCoins', align: 'center' }, { prop: 'use_coins', label: 'page.table.useCoins', align: 'center' },
{ prop: 'total_ticket_count', label: 'table.columns.dice.totalDrawCount', align: 'center' }, { prop: 'total_ticket_count', label: 'page.table.totalDrawCount', align: 'center' },
{ prop: 'paid_ticket_count', label: 'table.columns.dice.paidDrawCount', align: 'center' }, { prop: 'paid_ticket_count', label: 'page.table.paidDrawCount', align: 'center' },
{ prop: 'free_ticket_count', label: 'table.columns.dice.freeDrawCount', align: 'center' }, { prop: 'free_ticket_count', label: 'page.table.freeDrawCount', align: 'center' },
{ prop: 'remark', label: 'table.columns.common.remark', width: 100, align: 'center', showOverflowTooltip: true }, { prop: 'remark', label: 'page.table.remark', width: 100, align: 'center', showOverflowTooltip: true },
{ prop: 'create_time', label: 'table.columns.common.createTime', width: 170, align: 'center' }, { prop: 'create_time', label: 'page.table.createTime', width: 170, align: 'center' },
{ {
prop: 'operation', prop: 'operation',
label: 'table.actions.operation', label: 'table.actions.operation',

View File

@@ -9,12 +9,12 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.player')" prop="username"> <el-form-item :label="$t('page.search.player')" prop="username">
<el-input v-model="formData.username" :placeholder="$t('table.searchBar.byUsername')" clearable /> <el-input v-model="formData.username" :placeholder="$t('page.search.byUsername')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.useCoins')" prop="use_coins_min"> <el-form-item :label="$t('page.search.useCoins')" prop="use_coins_min">
<div class="range-wrap"> <div class="range-wrap">
<el-input-number <el-input-number
v-model="formData.use_coins_min" v-model="formData.use_coins_min"
@@ -35,7 +35,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.totalDrawCount')" prop="total_ticket_count_min"> <el-form-item :label="$t('page.search.totalDrawCount')" prop="total_ticket_count_min">
<div class="range-wrap"> <div class="range-wrap">
<el-input-number <el-input-number
v-model="formData.total_ticket_count_min" v-model="formData.total_ticket_count_min"
@@ -56,7 +56,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.paidDrawCount')" prop="paid_ticket_count_min"> <el-form-item :label="$t('page.search.paidDrawCount')" prop="paid_ticket_count_min">
<div class="range-wrap"> <div class="range-wrap">
<el-input-number <el-input-number
v-model="formData.paid_ticket_count_min" v-model="formData.paid_ticket_count_min"
@@ -77,7 +77,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.freeDrawCount')" prop="free_ticket_count_min"> <el-form-item :label="$t('page.search.freeDrawCount')" prop="free_ticket_count_min">
<div class="range-wrap"> <div class="range-wrap">
<el-input-number <el-input-number
v-model="formData.free_ticket_count_min" v-model="formData.free_ticket_count_min"
@@ -98,7 +98,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(8)"> <el-col v-bind="setSpan(8)">
<el-form-item :label="$t('table.columns.common.createTime')" prop="create_time_min"> <el-form-item :label="$t('page.search.createTime')" prop="create_time_min">
<el-date-picker <el-date-picker
v-model="formData.create_time" v-model="formData.create_time"
type="datetimerange" type="datetimerange"

View File

@@ -81,6 +81,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { useTable } from '@/hooks/core/useTable' import { useTable } from '@/hooks/core/useTable'
import { useSaiAdmin } from '@/composables/useSaiAdmin' import { useSaiAdmin } from '@/composables/useSaiAdmin'
import api from '../../api/player_wallet_record/index' import api from '../../api/player_wallet_record/index'
@@ -108,15 +109,16 @@
getData() getData()
} }
const { t } = useI18n()
// 类型展示0=充值 1=提现 2=购买抽奖次数 3=管理员加点 4=管理员扣点 5=抽奖 // 类型展示0=充值 1=提现 2=购买抽奖次数 3=管理员加点 4=管理员扣点 5=抽奖
const typeFormatter = (row: Record<string, unknown>) => { const typeFormatter = (row: Record<string, unknown>) => {
const t = row.type const ty = row.type
if (t === 0) return '充值' if (ty === 0) return t('page.search.typeRecharge')
if (t === 1) return '提现' if (ty === 1) return t('page.search.typeWithdraw')
if (t === 2) return '购买抽奖次数' if (ty === 2) return t('page.search.typeBuyTicket')
if (t === 3) return '管理员加点' if (ty === 3) return t('page.search.typeAdminAdd')
if (t === 4) return '管理员扣点' if (ty === 4) return t('page.search.typeAdminSub')
if (t === 5) return '抽奖' if (ty === 5) return t('page.table.typeDraw')
return '-' return '-'
} }
@@ -163,18 +165,18 @@
apiFn: api.list, apiFn: api.list,
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection', align: 'center' }, { type: 'selection', align: 'center' },
{ prop: 'id', label: 'table.columns.common.id', width: 80, align: 'center' }, { prop: 'id', label: 'page.table.id', width: 80, align: 'center' },
{ {
prop: 'player_id', prop: 'player_id',
label: 'table.columns.dice.user', label: 'page.table.user',
width: 120, width: 120,
align: 'center', align: 'center',
formatter: usernameFormatter formatter: usernameFormatter
}, },
{ prop: 'coin', label: 'table.columns.dice.coinChange', width: 110, align: 'center' }, { prop: 'coin', label: 'page.table.coinChange', width: 110, align: 'center' },
{ {
prop: 'type', prop: 'type',
label: 'table.columns.dice.type', label: 'page.table.type',
width: 140, width: 140,
align: 'center', align: 'center',
useSlot: true, useSlot: true,
@@ -182,24 +184,24 @@
}, },
{ {
prop: 'user_id', prop: 'user_id',
label: 'table.columns.dice.operator', label: 'page.table.operator',
width: 100, width: 100,
align: 'center', align: 'center',
formatter: operatorFormatter formatter: operatorFormatter
}, },
{ prop: 'wallet_before', label: 'table.columns.dice.walletBefore', width: 110, align: 'center' }, { prop: 'wallet_before', label: 'page.table.walletBefore', width: 110, align: 'center' },
{ prop: 'wallet_after', label: 'table.columns.dice.walletAfter', width: 110, align: 'center' }, { prop: 'wallet_after', label: 'page.table.walletAfter', width: 110, align: 'center' },
{ {
prop: 'remark', prop: 'remark',
label: 'table.columns.common.remark', label: 'page.table.remark',
width: 100, width: 100,
align: 'center', align: 'center',
showOverflowTooltip: true showOverflowTooltip: true
}, },
{ prop: 'total_ticket_count', label: 'table.columns.dice.totalDrawCount', align: 'center' }, { prop: 'total_ticket_count', label: 'page.table.totalDrawCount', align: 'center' },
{ prop: 'paid_ticket_count', label: 'table.columns.dice.paidDrawCount', align: 'center' }, { prop: 'paid_ticket_count', label: 'page.table.paidDrawCount', align: 'center' },
{ prop: 'free_ticket_count', label: 'table.columns.dice.freeDrawCount', align: 'center' }, { prop: 'free_ticket_count', label: 'page.table.freeDrawCount', align: 'center' },
{ prop: 'create_time', label: 'table.columns.common.createTime', width: 170, align: 'center' }, { prop: 'create_time', label: 'page.table.createTime', width: 170, align: 'center' },
{ {
prop: 'operation', prop: 'operation',
label: 'table.actions.operation', label: 'table.actions.operation',

View File

@@ -9,23 +9,23 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(5)"> <el-col v-bind="setSpan(5)">
<el-form-item :label="$t('table.columns.dice.type')" prop="type"> <el-form-item :label="$t('page.search.type')" prop="type">
<el-select v-model="formData.type" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.type" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="充值" :value="0" /> <el-option :label="$t('page.search.typeRecharge')" :value="0" />
<el-option label="提现" :value="1" /> <el-option :label="$t('page.search.typeWithdraw')" :value="1" />
<el-option label="购买抽奖次数" :value="2" /> <el-option :label="$t('page.search.typeBuyTicket')" :value="2" />
<el-option label="管理员加点" :value="3" /> <el-option :label="$t('page.search.typeAdminAdd')" :value="3" />
<el-option label="管理员扣点" :value="4" /> <el-option :label="$t('page.search.typeAdminSub')" :value="4" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(5)"> <el-col v-bind="setSpan(5)">
<el-form-item :label="$t('table.columns.dice.user')" prop="username"> <el-form-item :label="$t('page.search.user')" prop="username">
<el-input v-model="formData.username" :placeholder="$t('table.searchBar.byUsername')" clearable /> <el-input v-model="formData.username" :placeholder="$t('page.search.byUsername')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(8)"> <el-col v-bind="setSpan(8)">
<el-form-item :label="$t('table.columns.dice.coin')" prop="coin_min"> <el-form-item :label="$t('page.search.coin')" prop="coin_min">
<div class="coin-range-wrap"> <div class="coin-range-wrap">
<el-input-number <el-input-number
v-model="formData.coin_min" v-model="formData.coin_min"
@@ -46,7 +46,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(8)"> <el-col v-bind="setSpan(8)">
<el-form-item :label="$t('table.columns.common.createTime')" prop="create_time"> <el-form-item :label="$t('page.search.createTime')" prop="create_time">
<el-date-picker <el-date-picker
v-model="formData.create_time" v-model="formData.create_time"
type="datetimerange" type="datetimerange"

View File

@@ -3,8 +3,8 @@
<!-- 方向切换 + 搜索 --> <!-- 方向切换 + 搜索 -->
<div class="direction-bar"> <div class="direction-bar">
<el-radio-group v-model="currentDirection" size="default" @change="onDirectionChange"> <el-radio-group v-model="currentDirection" size="default" @change="onDirectionChange">
<el-radio-button :value="0">顺时针</el-radio-button> <el-radio-button :value="0">{{ $t('page.search.clockwise') }}</el-radio-button>
<el-radio-button :value="1">逆时针</el-radio-button> <el-radio-button :value="1">{{ $t('page.search.anticlockwise') }}</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<TableSearch v-model="searchForm" @search="handleSearch" @reset="resetSearchParams" /> <TableSearch v-model="searchForm" @search="handleSearch" @reset="resetSearchParams" />
@@ -19,14 +19,14 @@
@click="weightRatioVisible = true" @click="weightRatioVisible = true"
v-ripple v-ripple
> >
权重配比 {{ $t('page.toolbar.weightRatio') }}
</ElButton> </ElButton>
<ElButton <ElButton
v-permission="'dice:reward:index:index'" v-permission="'dice:reward:index:index'"
@click="weightTestVisible = true" @click="weightTestVisible = true"
v-ripple v-ripple
> >
一键测试权重 {{ $t('page.toolbar.weightTest') }}
</ElButton> </ElButton>
</ElSpace> </ElSpace>
</template> </template>
@@ -99,12 +99,12 @@
apiFn: listApi, apiFn: listApi,
apiParams: { direction: 0, limit: 100 }, apiParams: { direction: 0, limit: 100 },
columnsFactory: () => [ columnsFactory: () => [
{ prop: 'start_index', label: 'table.columns.dice.startIndex', width: 100, align: 'center' }, { prop: 'start_index', label: 'page.table.startIndex', width: 100, align: 'center' },
{ prop: 'end_index', label: 'table.columns.dice.endIndex', width: 110, align: 'center' }, { prop: 'end_index', label: 'page.table.endIndex', width: 110, align: 'center' },
{ prop: 'tier', label: 'table.columns.dice.tier', width: 90, align: 'center', sortable: true }, { prop: 'tier', label: 'page.table.tier', width: 90, align: 'center', sortable: true },
{ {
prop: 'grid_number', prop: 'grid_number',
label: 'table.columns.dice.dicePoints', label: 'page.table.dicePoints',
width: 120, width: 120,
align: 'center', align: 'center',
sortable: true, sortable: true,
@@ -112,14 +112,14 @@
}, },
{ {
prop: 'ui_text', prop: 'ui_text',
label: 'table.columns.dice.displayText', label: 'page.table.displayText',
minWidth: 100, minWidth: 100,
align: 'center', align: 'center',
showOverflowTooltip: true showOverflowTooltip: true
}, },
{ prop: 'real_ev', label: 'table.columns.dice.realEv', width: 110, align: 'center' }, { prop: 'real_ev', label: 'page.table.realEv', width: 110, align: 'center' },
{ prop: 'remark', label: 'table.columns.common.remark', minWidth: 80, align: 'center', showOverflowTooltip: true }, { prop: 'remark', label: 'page.table.remark', minWidth: 80, align: 'center', showOverflowTooltip: true },
{ prop: 'weight', label: 'table.columns.dice.weight', width: 110, align: 'center' } { prop: 'weight', label: 'page.table.weight', width: 110, align: 'center' }
] ]
} }
}) })

View File

@@ -8,7 +8,7 @@
@search="handleSearch" @search="handleSearch"
> >
<el-col v-bind="setSpan(8)"> <el-col v-bind="setSpan(8)">
<el-form-item :label="$t('table.columns.dice.tier')" prop="tier"> <el-form-item :label="$t('page.search.tier')" prop="tier">
<el-select v-model="formData.tier" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.tier" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="T1" value="T1" /> <el-option label="T1" value="T1" />
<el-option label="T2" value="T2" /> <el-option label="T2" value="T2" />

View File

@@ -3,7 +3,7 @@
<ElCard shadow="never" class="form-card"> <ElCard shadow="never" class="form-card">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span>游戏奖励配置</span> <span>{{ $t('page.toolbar.gameRewardConfig') }}</span>
<ElButton <ElButton
v-permission="'dice:reward_config:index:update'" v-permission="'dice:reward_config:index:update'"
type="warning" type="warning"
@@ -12,7 +12,7 @@
v-ripple v-ripple
title="按规则start_index=config(grid_number).id顺时针 end_index=(start_index+grid_number)%26逆时针 end_index=start_index-grid_number≥0?start_index-grid_number:26+start_index-grid_number" title="按规则start_index=config(grid_number).id顺时针 end_index=(start_index+grid_number)%26逆时针 end_index=start_index-grid_number≥0?start_index-grid_number:26+start_index-grid_number"
> >
创建奖励对照 {{ $t('page.toolbar.createRewardRef') }}
</ElButton> </ElButton>
</div> </div>
</template> </template>

View File

@@ -9,7 +9,7 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.dicePoints')" prop="grid_number_min"> <el-form-item :label="$t('page.search.dicePoints')" prop="grid_number_min">
<div class="range-wrap"> <div class="range-wrap">
<el-input-number <el-input-number
v-model="formData.grid_number_min" v-model="formData.grid_number_min"
@@ -28,12 +28,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.displayText')" prop="ui_text"> <el-form-item :label="$t('page.search.displayText')" prop="ui_text">
<el-input v-model="formData.ui_text" :placeholder="$t('table.searchBar.fuzzyQuery')" clearable /> <el-input v-model="formData.ui_text" :placeholder="$t('page.search.fuzzyQuery')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.realEv')" prop="real_ev_min"> <el-form-item :label="$t('page.search.realEv')" prop="real_ev_min">
<div class="range-wrap"> <div class="range-wrap">
<el-input-number <el-input-number
v-model="formData.real_ev_min" v-model="formData.real_ev_min"
@@ -54,7 +54,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.dice.tier')" prop="tier"> <el-form-item :label="$t('page.search.tier')" prop="tier">
<el-select v-model="formData.tier" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%"> <el-select v-model="formData.tier" :placeholder="$t('table.searchBar.all')" clearable style="width: 100%">
<el-option label="T1" value="T1" /> <el-option label="T1" value="T1" />
<el-option label="T2" value="T2" /> <el-option label="T2" value="T2" />

View File

@@ -17,7 +17,7 @@
<template #icon> <template #icon>
<ArtSvgIcon icon="ri:delete-bin-5-line" /> <ArtSvgIcon icon="ri:delete-bin-5-line" />
</template> </template>
删除 {{ $t('table.actions.delete') }}
</ElButton> </ElButton>
</ElSpace> </ElSpace>
</template> </template>
@@ -58,7 +58,7 @@
<SaButton <SaButton
v-permission="'dice:reward_config_record:index:read'" v-permission="'dice:reward_config_record:index:read'"
type="success" type="success"
toolTip="查看详情" :toolTip="$t('page.toolbar.viewDetail')"
@click="openDetail(row)" @click="openDetail(row)"
/> />
<SaButton <SaButton
@@ -84,6 +84,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { useTable } from '@/hooks/core/useTable' import { useTable } from '@/hooks/core/useTable'
import { useSaiAdmin } from '@/composables/useSaiAdmin' import { useSaiAdmin } from '@/composables/useSaiAdmin'
import api from '../../api/reward_config_record/index' import api from '../../api/reward_config_record/index'
@@ -119,12 +120,13 @@
} }
} }
const { t } = useI18n()
// 状态文案:-1失败 0测试中 1完成2=执行中也显示测试中) // 状态文案:-1失败 0测试中 1完成2=执行中也显示测试中)
function formatStatus(status: unknown): string { function formatStatus(status: unknown): string {
const s = Number(status) const s = Number(status)
if (s === -1) return '失败' if (s === -1) return t('page.table.statusFail')
if (s === 1) return '完成' if (s === 1) return t('page.table.statusDone')
if (s === 0 || s === 2) return '测试中' if (s === 0 || s === 2) return t('page.table.statusTesting')
return '—' return '—'
} }
@@ -168,44 +170,44 @@
apiParams: { limit: 100 }, apiParams: { limit: 100 },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'id', label: 'table.columns.common.id', width: 80, align: 'center' }, { prop: 'id', label: 'page.table.id', width: 80, align: 'center' },
{ {
prop: 'status', prop: 'status',
label: 'table.columns.common.status', label: 'page.table.status',
width: 90, width: 90,
align: 'center', align: 'center',
useSlot: true useSlot: true
}, },
{ {
prop: 'paid_draw', prop: 'paid_draw',
label: 'table.columns.dice.paidDraw', label: 'page.table.paidDraw',
width: 160, width: 160,
align: 'center', align: 'center',
useSlot: true useSlot: true
}, },
{ {
prop: 'free_draw', prop: 'free_draw',
label: 'table.columns.dice.freeDraw', label: 'page.table.freeDraw',
width: 160, width: 160,
align: 'center', align: 'center',
useSlot: true useSlot: true
}, },
{ {
prop: 'platform_profit', prop: 'platform_profit',
label: 'table.columns.dice.platformProfit', label: 'page.table.platformProfit',
width: 120, width: 120,
align: 'center', align: 'center',
useSlot: true useSlot: true
}, },
{ prop: 'total_play_count', label: 'table.columns.dice.totalDrawCount', width: 110, align: 'center' }, { prop: 'total_play_count', label: 'page.table.totalDrawCount', width: 110, align: 'center' },
{ {
prop: 'admin_name', prop: 'admin_name',
label: 'table.columns.dice.createdBy', label: 'page.table.createdBy',
width: 120, width: 120,
align: 'center', align: 'center',
showOverflowTooltip: true showOverflowTooltip: true
}, },
{ prop: 'create_time', label: 'table.columns.common.createTime', width: 170, align: 'center' }, { prop: 'create_time', label: 'page.table.createTime', width: 170, align: 'center' },
{ {
prop: 'operation', prop: 'operation',
label: 'table.actions.operation', label: 'table.actions.operation',

View File

@@ -244,18 +244,18 @@
}, },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'url', label: 'table.columns.safeguard.preview', saiType: 'image', width: 80 }, { prop: 'url', label: 'page.table.preview', saiType: 'image', width: 80 },
{ prop: 'origin_name', label: 'table.columns.safeguard.fileName', minWidth: 160, showOverflowTooltip: true }, { prop: 'origin_name', label: 'page.table.fileName', minWidth: 160, showOverflowTooltip: true },
{ {
prop: 'storage_mode', prop: 'storage_mode',
label: 'table.columns.safeguard.storageMode', label: 'page.table.storageMode',
width: 100, width: 100,
saiType: 'dict', saiType: 'dict',
saiDict: 'upload_mode' saiDict: 'upload_mode'
}, },
{ prop: 'mime_type', label: 'table.columns.safeguard.fileType', width: 160, showOverflowTooltip: true }, { prop: 'mime_type', label: 'page.table.fileType', width: 160, showOverflowTooltip: true },
{ prop: 'size_info', label: 'table.columns.safeguard.fileSize', width: 100 }, { prop: 'size_info', label: 'page.table.fileSize', width: 100 },
{ prop: 'create_time', label: 'table.columns.safeguard.uploadTime', width: 180, sortable: true }, { prop: 'create_time', label: 'page.table.uploadTime', width: 180, sortable: true },
{ prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -9,18 +9,18 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.username')" prop="username"> <el-form-item :label="$t('page.search.username')" prop="username">
<el-input v-model="formData.username" :placeholder="$t('table.searchBar.placeholderUsername')" clearable /> <el-input v-model="formData.username" :placeholder="$t('page.search.placeholderUsername')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.phone')" prop="phone"> <el-form-item :label="$t('page.search.phone')" prop="phone">
<el-input v-model="formData.phone" :placeholder="$t('table.searchBar.placeholderPhone')" clearable /> <el-input v-model="formData.phone" :placeholder="$t('page.search.placeholderPhone')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.common.status')" prop="status"> <el-form-item :label="$t('page.search.status')" prop="status">
<sa-select v-model="formData.status" dict="data_status" :placeholder="$t('table.searchBar.searchSelectPlaceholder')" clearable /> <sa-select v-model="formData.status" dict="data_status" :placeholder="$t('page.search.searchSelectPlaceholder')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</sa-search-bar> </sa-search-bar>

View File

@@ -125,15 +125,15 @@
}, },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'name', label: 'table.columns.safeguard.tableName', minWidth: 200 }, { prop: 'name', label: 'page.table.tableName', minWidth: 200 },
{ prop: 'comment', label: 'table.columns.safeguard.tableComment', minWidth: 150, showOverflowTooltip: true }, { prop: 'comment', label: 'page.table.tableComment', minWidth: 150, showOverflowTooltip: true },
{ prop: 'engine', label: 'table.columns.safeguard.tableEngine', width: 120 }, { prop: 'engine', label: 'page.table.tableEngine', width: 120 },
{ prop: 'update_time', label: 'table.columns.common.updateTime', width: 180, sortable: true }, { prop: 'update_time', label: 'page.table.updateTime', width: 180, sortable: true },
{ prop: 'rows', label: 'table.columns.safeguard.totalRows', width: 120 }, { prop: 'rows', label: 'page.table.totalRows', width: 120 },
{ prop: 'data_free', label: 'table.columns.safeguard.fragmentSize', width: 120 }, { prop: 'data_free', label: 'page.table.fragmentSize', width: 120 },
{ prop: 'data_length', label: 'table.columns.safeguard.dataSize', width: 120 }, { prop: 'data_length', label: 'page.table.dataSize', width: 120 },
{ prop: 'collation', label: 'table.columns.safeguard.collation', width: 180 }, { prop: 'collation', label: 'page.table.collation', width: 180 },
{ prop: 'create_time', label: 'table.columns.common.createTime', width: 180, sortable: true }, { prop: 'create_time', label: 'page.table.createTime', width: 180, sortable: true },
{ prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -140,8 +140,8 @@
}, },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'delete_time', label: 'table.columns.safeguard.deleteTime', width: 180 }, { prop: 'delete_time', label: 'page.table.deleteTime', width: 180 },
{ prop: 'json_data', label: 'table.columns.safeguard.dataDetail', useSlot: true, showOverflowTooltip: true } { prop: 'json_data', label: 'page.table.dataDetail', useSlot: true, showOverflowTooltip: true }
] ]
} }
}) })

View File

@@ -9,8 +9,8 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.safeguard.tableName')" prop="name"> <el-form-item :label="$t('page.search.tableName')" prop="name">
<el-input v-model="formData.name" :placeholder="$t('table.searchBar.placeholderTableName')" clearable /> <el-input v-model="formData.name" :placeholder="$t('page.search.placeholderTableName')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</sa-search-bar> </sa-search-bar>

View File

@@ -268,10 +268,10 @@
...typeSearch.value ...typeSearch.value
}, },
columnsFactory: () => [ columnsFactory: () => [
{ prop: 'id', label: 'table.columns.common.select', width: 80, align: 'center', useSlot: true }, { prop: 'id', label: 'page.table.select', width: 80, align: 'center', useSlot: true },
{ prop: 'name', label: 'table.columns.safeguard.dictName', useHeaderSlot: true, width: 150 }, { prop: 'name', label: 'page.table.dictName', useHeaderSlot: true, width: 150 },
{ prop: 'code', label: 'table.columns.safeguard.dictCode', useHeaderSlot: true, width: 150 }, { prop: 'code', label: 'page.table.dictCode', useHeaderSlot: true, width: 150 },
{ prop: 'status', label: 'table.columns.common.status', saiType: 'dict', saiDict: 'data_status', width: 100 } { prop: 'status', label: 'page.table.status', saiType: 'dict', saiDict: 'data_status', width: 100 }
] ]
} }
}) })
@@ -312,11 +312,11 @@
}, },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'label', label: 'table.columns.safeguard.dictLabel', useSlot: true }, { prop: 'label', label: 'page.table.dictLabel', useSlot: true },
{ prop: 'value', label: 'table.columns.safeguard.dictValue' }, { prop: 'value', label: 'page.table.dictValue' },
{ prop: 'color', label: 'table.columns.safeguard.color' }, { prop: 'color', label: 'page.table.color' },
{ prop: 'sort', label: 'table.columns.common.sort' }, { prop: 'sort', label: 'page.table.sort' },
{ prop: 'status', label: 'table.columns.common.status', saiType: 'dict', saiDict: 'data_status' }, { prop: 'status', label: 'page.table.status', saiType: 'dict', saiDict: 'data_status' },
{ prop: 'operation', label: 'table.actions.operation', useSlot: true, width: 120 } { prop: 'operation', label: 'table.actions.operation', useSlot: true, width: 120 }
] ]
} }

View File

@@ -103,14 +103,14 @@
}, },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'id', label: 'table.columns.common.no', width: 100, align: 'center' }, { prop: 'id', label: 'page.table.no', width: 100, align: 'center' },
{ prop: 'gateway', label: 'table.columns.safeguard.gateway' }, { prop: 'gateway', label: 'page.table.gateway' },
{ prop: 'from', label: 'table.columns.safeguard.emailFrom', minWidth: 150, showOverflowTooltip: true }, { prop: 'from', label: 'page.table.emailFrom', minWidth: 150, showOverflowTooltip: true },
{ prop: 'email', label: 'table.columns.safeguard.emailTo', minWidth: 150, showOverflowTooltip: true }, { prop: 'email', label: 'page.table.emailTo', minWidth: 150, showOverflowTooltip: true },
{ prop: 'code', label: 'table.columns.safeguard.emailCode' }, { prop: 'code', label: 'page.table.emailCode' },
{ prop: 'status', label: 'table.columns.safeguard.sendStatus', useSlot: true }, { prop: 'status', label: 'page.table.sendStatus', useSlot: true },
{ prop: 'response', label: 'table.columns.safeguard.emailResponse', minWidth: 150, showOverflowTooltip: true }, { prop: 'response', label: 'page.table.emailResponse', minWidth: 150, showOverflowTooltip: true },
{ prop: 'create_time', label: 'table.columns.safeguard.sendTime', width: 180, sortable: true }, { prop: 'create_time', label: 'page.table.sendTime', width: 180, sortable: true },
{ prop: 'operation', label: 'table.actions.operation', width: 80, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 80, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -9,25 +9,25 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.searchBar.labelFrom')" prop="from"> <el-form-item :label="$t('page.search.labelFrom')" prop="from">
<el-input v-model="formData.from" :placeholder="$t('table.searchBar.placeholderFrom')" clearable /> <el-input v-model="formData.from" :placeholder="$t('page.search.placeholderFrom')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.searchBar.labelTo')" prop="email"> <el-form-item :label="$t('page.search.labelTo')" prop="email">
<el-input v-model="formData.email" :placeholder="$t('table.searchBar.placeholderTo')" clearable /> <el-input v-model="formData.email" :placeholder="$t('page.search.placeholderTo')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.searchBar.placeholderSendStatus')" prop="status"> <el-form-item :label="$t('page.search.placeholderSendStatus')" prop="status">
<el-select v-model="formData.status" :placeholder="$t('table.searchBar.placeholderSendStatus')" clearable> <el-select v-model="formData.status" :placeholder="$t('page.search.placeholderSendStatus')" clearable>
<el-option :label="$t('table.searchBar.success')" value="success" /> <el-option :label="$t('table.searchBar.success')" value="success" />
<el-option :label="$t('table.searchBar.failure')" value="failure" /> <el-option :label="$t('table.searchBar.failure')" value="failure" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(12)" v-show="isExpanded"> <el-col v-bind="setSpan(12)" v-show="isExpanded">
<el-form-item :label="$t('table.columns.safeguard.operTime')" prop="create_time"> <el-form-item :label="$t('page.search.operTime')" prop="create_time">
<el-date-picker <el-date-picker
v-model="formData.create_time" v-model="formData.create_time"
type="datetimerange" type="datetimerange"

View File

@@ -103,15 +103,15 @@
}, },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'id', label: 'table.columns.common.no', width: 100, align: 'center' }, { prop: 'id', label: 'page.table.no', width: 100, align: 'center' },
{ prop: 'username', label: 'table.columns.safeguard.loginUser' }, { prop: 'username', label: 'page.table.loginUser' },
{ prop: 'status', label: 'table.columns.safeguard.loginStatus', useSlot: true }, { prop: 'status', label: 'page.table.loginStatus', useSlot: true },
{ prop: 'ip', label: 'table.columns.safeguard.loginIp' }, { prop: 'ip', label: 'page.table.loginIp' },
{ prop: 'ip_location', label: 'table.columns.safeguard.operLocation' }, { prop: 'ip_location', label: 'page.table.operLocation' },
{ prop: 'os', label: 'table.columns.safeguard.os' }, { prop: 'os', label: 'page.table.os' },
{ prop: 'browser', label: 'table.columns.safeguard.browser' }, { prop: 'browser', label: 'page.table.browser' },
{ prop: 'message', label: 'table.columns.safeguard.loginMessage', showOverflowTooltip: true }, { prop: 'message', label: 'page.table.loginMessage', showOverflowTooltip: true },
{ prop: 'login_time', label: 'table.columns.safeguard.loginTime', width: 180, sortable: true }, { prop: 'login_time', label: 'page.table.loginTime', width: 180, sortable: true },
{ prop: 'operation', label: 'table.actions.operation', width: 80, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 80, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -9,25 +9,25 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.safeguard.loginUser')" prop="username"> <el-form-item :label="$t('page.search.loginUser')" prop="username">
<el-input v-model="formData.username" :placeholder="$t('table.searchBar.placeholderLoginUser')" clearable /> <el-input v-model="formData.username" :placeholder="$t('page.search.placeholderLoginUser')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.safeguard.loginIp')" prop="ip"> <el-form-item :label="$t('page.search.loginIp')" prop="ip">
<el-input v-model="formData.ip" :placeholder="$t('table.searchBar.placeholderLoginIp')" clearable /> <el-input v-model="formData.ip" :placeholder="$t('page.search.placeholderLoginIp')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.safeguard.loginStatus')" prop="status"> <el-form-item :label="$t('page.search.loginStatus')" prop="status">
<el-select v-model="formData.status" :placeholder="$t('table.searchBar.placeholderLoginStatus')" clearable> <el-select v-model="formData.status" :placeholder="$t('page.search.placeholderLoginStatus')" clearable>
<el-option :label="$t('table.searchBar.success')" value="1" /> <el-option :label="$t('table.searchBar.success')" value="1" />
<el-option :label="$t('table.searchBar.failure')" value="0" /> <el-option :label="$t('table.searchBar.failure')" value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(12)" v-show="isExpanded"> <el-col v-bind="setSpan(12)" v-show="isExpanded">
<el-form-item :label="$t('table.columns.safeguard.operTime')" prop="login_time"> <el-form-item :label="$t('page.search.operTime')" prop="login_time">
<el-date-picker <el-date-picker
v-model="formData.login_time" v-model="formData.login_time"
type="datetimerange" type="datetimerange"

View File

@@ -102,13 +102,13 @@
}, },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'id', label: 'table.columns.common.no', width: 100, align: 'center' }, { prop: 'id', label: 'page.table.no', width: 100, align: 'center' },
{ prop: 'username', label: 'table.columns.safeguard.operator' }, { prop: 'username', label: 'page.table.operator' },
{ prop: 'service_name', label: 'table.columns.safeguard.serviceName' }, { prop: 'service_name', label: 'page.table.serviceName' },
{ prop: 'router', label: 'table.columns.safeguard.router', minWidth: 180, showOverflowTooltip: true }, { prop: 'router', label: 'page.table.router', minWidth: 180, showOverflowTooltip: true },
{ prop: 'ip', label: 'table.columns.safeguard.operIp' }, { prop: 'ip', label: 'page.table.operIp' },
{ prop: 'ip_location', label: 'table.columns.safeguard.operLocation' }, { prop: 'ip_location', label: 'page.table.operLocation' },
{ prop: 'create_time', label: 'table.columns.safeguard.operTime', width: 180, sortable: true }, { prop: 'create_time', label: 'page.table.operTime', width: 180, sortable: true },
{ prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -9,22 +9,22 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.safeguard.operator')" prop="username"> <el-form-item :label="$t('page.search.operator')" prop="username">
<el-input v-model="formData.username" :placeholder="$t('table.searchBar.placeholderOperator')" clearable /> <el-input v-model="formData.username" :placeholder="$t('page.search.placeholderOperator')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.safeguard.router')" prop="router"> <el-form-item :label="$t('page.search.router')" prop="router">
<el-input v-model="formData.router" :placeholder="$t('table.searchBar.placeholderOperRouter')" clearable /> <el-input v-model="formData.router" :placeholder="$t('page.search.placeholderOperRouter')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.safeguard.operIp')" prop="ip"> <el-form-item :label="$t('page.search.operIp')" prop="ip">
<el-input v-model="formData.ip" :placeholder="$t('table.searchBar.placeholderOperIp')" clearable /> <el-input v-model="formData.ip" :placeholder="$t('page.search.placeholderOperIp')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(12)" v-show="isExpanded"> <el-col v-bind="setSpan(12)" v-show="isExpanded">
<el-form-item :label="$t('table.columns.safeguard.operTime')" prop="create_time"> <el-form-item :label="$t('page.search.operTime')" prop="create_time">
<el-date-picker <el-date-picker
v-model="formData.create_time" v-model="formData.create_time"
type="datetimerange" type="datetimerange"

View File

@@ -300,9 +300,9 @@
...configSearch.value ...configSearch.value
}, },
columnsFactory: () => [ columnsFactory: () => [
{ prop: 'id', label: 'table.columns.common.select', width: 80, align: 'center', useSlot: true }, { prop: 'id', label: 'page.table.select', width: 80, align: 'center', useSlot: true },
{ prop: 'name', label: 'table.columns.system.configName', useHeaderSlot: true, width: 150 }, { prop: 'name', label: 'page.table.configName', useHeaderSlot: true, width: 150 },
{ prop: 'code', label: 'table.columns.system.configKey', useHeaderSlot: true, width: 150 } { prop: 'code', label: 'page.table.configKey', useHeaderSlot: true, width: 150 }
] ]
} }
}) })

View File

@@ -106,13 +106,13 @@
core: { core: {
apiFn: api.list, apiFn: api.list,
columnsFactory: () => [ columnsFactory: () => [
{ prop: 'name', label: 'table.columns.system.deptName', minWidth: 200 }, { prop: 'name', label: 'page.table.deptName', minWidth: 200 },
{ prop: 'code', label: 'table.columns.system.deptCode', minWidth: 120 }, { prop: 'code', label: 'page.table.deptCode', minWidth: 120 },
{ prop: 'leader.username', label: 'table.columns.system.leader', minWidth: 120 }, { prop: 'leader.username', label: 'page.table.leader', minWidth: 120 },
{ prop: 'remark', label: 'table.columns.common.description', minWidth: 150, showOverflowTooltip: true }, { prop: 'remark', label: 'table.columns.common.description', minWidth: 150, showOverflowTooltip: true },
{ prop: 'sort', label: 'table.columns.common.sort', width: 100 }, { prop: 'sort', label: 'page.table.sort', width: 100 },
{ prop: 'status', label: 'table.columns.common.status', saiType: 'dict', saiDict: 'data_status', width: 100 }, { prop: 'status', label: 'page.table.status', saiType: 'dict', saiDict: 'data_status', width: 100 },
{ prop: 'create_time', label: 'table.columns.system.createDate', width: 180, sortable: true }, { prop: 'create_time', label: 'page.table.createTime', width: 180, sortable: true },
{ prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -9,18 +9,18 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.deptName')" prop="name"> <el-form-item :label="$t('page.search.deptName')" prop="name">
<el-input v-model="formData.name" :placeholder="$t('table.searchBar.placeholderDeptName')" clearable /> <el-input v-model="formData.name" :placeholder="$t('page.search.placeholderDeptName')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.deptCode')" prop="code"> <el-form-item :label="$t('page.search.deptCode')" prop="code">
<el-input v-model="formData.code" :placeholder="$t('table.searchBar.placeholderDeptCode')" clearable /> <el-input v-model="formData.code" :placeholder="$t('page.search.placeholderDeptCode')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.common.status')" prop="status"> <el-form-item :label="$t('page.search.status')" prop="status">
<sa-select v-model="formData.status" dict="data_status" :placeholder="$t('table.searchBar.searchSelectPlaceholder')" clearable /> <sa-select v-model="formData.status" dict="data_status" :placeholder="$t('page.search.searchSelectPlaceholder')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</sa-search-bar> </sa-search-bar>

View File

@@ -129,10 +129,10 @@
apiFn: api.list, apiFn: api.list,
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'name', label: 'table.columns.system.menuName', minWidth: 150 }, { prop: 'name', label: 'page.table.menuName', minWidth: 150 },
{ {
prop: 'type', prop: 'type',
label: 'table.columns.system.menuType', label: 'page.table.menuType',
align: 'center', align: 'center',
saiType: 'dict', saiType: 'dict',
saiDict: 'menu_type', saiDict: 'menu_type',
@@ -140,17 +140,17 @@
}, },
{ {
prop: 'icon', prop: 'icon',
label: 'table.columns.system.icon', label: 'page.table.icon',
align: 'center', align: 'center',
width: 80, width: 80,
formatter: (row: any) => { formatter: (row: any) => {
return h(ArtSvgIcon, { icon: row.icon }) return h(ArtSvgIcon, { icon: row.icon })
} }
}, },
{ prop: 'code', label: 'table.columns.system.component' }, { prop: 'code', label: 'page.table.component' },
{ {
prop: 'path', prop: 'path',
label: 'table.columns.system.route', label: 'page.table.route',
formatter: (row: any) => { formatter: (row: any) => {
if (row.type === 3) return '' if (row.type === 3) return ''
return row.path || '' return row.path || ''
@@ -158,7 +158,7 @@
}, },
{ {
prop: 'slug', prop: 'slug',
label: 'table.columns.system.auth', label: 'page.table.auth',
minWidth: 160, minWidth: 160,
formatter: (row: any) => { formatter: (row: any) => {
if (row.type === 2) { if (row.type === 2) {
@@ -170,8 +170,8 @@
return '' return ''
} }
}, },
{ prop: 'sort', label: 'table.columns.common.sort', width: 100 }, { prop: 'sort', label: 'page.table.sort', width: 100 },
{ prop: 'status', label: 'table.columns.common.status', saiType: 'dict', saiDict: 'data_status', width: 100 }, { prop: 'status', label: 'page.table.status', saiType: 'dict', saiDict: 'data_status', width: 100 },
{ prop: 'operation', label: 'table.actions.operation', width: 140, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 140, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -9,18 +9,18 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.menuName')" prop="name"> <el-form-item :label="$t('page.search.menuName')" prop="name">
<el-input v-model="formData.name" :placeholder="$t('table.searchBar.placeholderMenuName')" clearable /> <el-input v-model="formData.name" :placeholder="$t('page.search.placeholderMenuName')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.route')" prop="path"> <el-form-item :label="$t('page.search.route')" prop="path">
<el-input v-model="formData.path" :placeholder="$t('table.searchBar.placeholderMenuRoute')" clearable /> <el-input v-model="formData.path" :placeholder="$t('page.search.placeholderMenuRoute')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.common.status')" prop="status"> <el-form-item :label="$t('page.search.status')" prop="status">
<sa-select v-model="formData.status" dict="data_status" :placeholder="$t('table.searchBar.searchSelectPlaceholder')" clearable /> <sa-select v-model="formData.status" dict="data_status" :placeholder="$t('page.search.searchSelectPlaceholder')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</sa-search-bar> </sa-search-bar>

View File

@@ -117,12 +117,12 @@
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'id', label: 'table.columns.common.no', width: 100, align: 'center' }, { prop: 'id', label: 'table.columns.common.no', width: 100, align: 'center' },
{ prop: 'name', label: 'table.columns.system.postName', minWidth: 120 }, { prop: 'name', label: 'page.table.postName', minWidth: 120 },
{ prop: 'code', label: 'table.columns.system.postCode', minWidth: 120 }, { prop: 'code', label: 'page.table.postCode', minWidth: 120 },
{ prop: 'remark', label: 'table.columns.common.description', minWidth: 150, showOverflowTooltip: true }, { prop: 'remark', label: 'table.columns.common.description', minWidth: 150, showOverflowTooltip: true },
{ prop: 'sort', label: 'table.columns.common.sort', width: 100 }, { prop: 'sort', label: 'page.table.sort', width: 100 },
{ prop: 'status', label: 'table.columns.common.status', saiType: 'dict', saiDict: 'data_status', width: 100 }, { prop: 'status', label: 'page.table.status', saiType: 'dict', saiDict: 'data_status', width: 100 },
{ prop: 'create_time', label: 'table.columns.system.createDate', width: 180, sortable: true }, { prop: 'create_time', label: 'page.table.createTime', width: 180, sortable: true },
{ prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 100, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -9,18 +9,18 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.postName')" prop="name"> <el-form-item :label="$t('page.search.postName')" prop="name">
<el-input v-model="formData.name" :placeholder="$t('table.searchBar.placeholderPostName')" clearable /> <el-input v-model="formData.name" :placeholder="$t('page.search.placeholderPostName')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.postCode')" prop="code"> <el-form-item :label="$t('page.search.postCode')" prop="code">
<el-input v-model="formData.code" :placeholder="$t('table.searchBar.placeholderPostCode')" clearable /> <el-input v-model="formData.code" :placeholder="$t('page.search.placeholderPostCode')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.common.status')" prop="status"> <el-form-item :label="$t('page.search.status')" prop="status">
<sa-select v-model="formData.status" dict="data_status" :placeholder="$t('table.searchBar.searchSelectPlaceholder')" clearable /> <sa-select v-model="formData.status" dict="data_status" :placeholder="$t('page.search.searchSelectPlaceholder')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</sa-search-bar> </sa-search-bar>

View File

@@ -127,13 +127,13 @@
apiFn: api.list, apiFn: api.list,
columnsFactory: () => [ columnsFactory: () => [
{ prop: 'id', label: 'table.columns.common.no', minWidth: 60, align: 'center' }, { prop: 'id', label: 'table.columns.common.no', minWidth: 60, align: 'center' },
{ prop: 'name', label: 'table.columns.system.roleName', minWidth: 120 }, { prop: 'name', label: 'page.table.roleName', minWidth: 120 },
{ prop: 'code', label: 'table.columns.system.roleCode', minWidth: 120 }, { prop: 'code', label: 'page.table.roleCode', minWidth: 120 },
{ prop: 'level', label: 'table.columns.system.level', minWidth: 100, sortable: true }, { prop: 'level', label: 'page.table.level', minWidth: 100, sortable: true },
{ prop: 'remark', label: 'table.columns.system.roleRemark', minWidth: 150, showOverflowTooltip: true }, { prop: 'remark', label: 'page.table.roleRemark', minWidth: 150, showOverflowTooltip: true },
{ prop: 'sort', label: 'table.columns.common.sort', minWidth: 100 }, { prop: 'sort', label: 'table.columns.common.sort', minWidth: 100 },
{ prop: 'status', label: 'table.columns.common.status', saiType: 'dict', saiDict: 'data_status' }, { prop: 'status', label: 'page.table.status', saiType: 'dict', saiDict: 'data_status' },
{ prop: 'create_time', label: 'table.columns.system.createDate', width: 180, sortable: true }, { prop: 'create_time', label: 'page.table.createTime', width: 180, sortable: true },
{ prop: 'operation', label: 'table.actions.operation', width: 140, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 140, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -9,18 +9,18 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.roleName')" prop="name"> <el-form-item :label="$t('page.search.roleName')" prop="name">
<el-input v-model="formData.name" :placeholder="$t('table.searchBar.placeholderRoleName')" clearable /> <el-input v-model="formData.name" :placeholder="$t('page.search.placeholderRoleName')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.roleCode')" prop="code"> <el-form-item :label="$t('page.search.roleCode')" prop="code">
<el-input v-model="formData.code" :placeholder="$t('table.searchBar.placeholderRoleCode')" clearable /> <el-input v-model="formData.code" :placeholder="$t('page.search.placeholderRoleCode')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.common.status')" prop="status"> <el-form-item :label="$t('page.search.status')" prop="status">
<sa-select v-model="formData.status" dict="data_status" :placeholder="$t('table.searchBar.searchSelectPlaceholder')" clearable /> <sa-select v-model="formData.status" dict="data_status" :placeholder="$t('page.search.searchSelectPlaceholder')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</sa-search-bar> </sa-search-bar>

View File

@@ -183,24 +183,24 @@
{ type: 'index', width: 60, label: 'table.column.index' }, { type: 'index', width: 60, label: 'table.column.index' },
{ {
prop: 'avatar', prop: 'avatar',
label: 'table.columns.system.username', label: 'page.table.username',
minWidth: 200, minWidth: 200,
saiType: 'imageAndText', saiType: 'imageAndText',
saiFirst: 'username', saiFirst: 'username',
saiSecond: 'email' saiSecond: 'email'
}, },
{ prop: 'phone', label: 'table.columns.system.phone', width: 120 }, { prop: 'phone', label: 'page.table.phone', width: 120 },
{ {
prop: 'dept_id', prop: 'dept_id',
label: 'table.columns.system.dept', label: 'page.table.dept',
minWidth: 150, minWidth: 150,
sortable: true, sortable: true,
formatter: (row: any) => row.depts?.name ?? '' formatter: (row: any) => row.depts?.name ?? ''
}, },
{ prop: 'status', label: 'table.columns.common.status', width: 80, saiType: 'dict', saiDict: 'data_status' }, { prop: 'status', label: 'page.table.status', width: 80, saiType: 'dict', saiDict: 'data_status' },
{ prop: 'agent_id', label: 'table.columns.system.agentId', width: 120, showOverflowTooltip: true }, { prop: 'agent_id', label: 'page.table.agentId', width: 120, showOverflowTooltip: true },
{ prop: 'dashboard', label: 'table.columns.system.dashboard', width: 100, saiType: 'dict', saiDict: 'dashboard' }, { prop: 'dashboard', label: 'page.table.dashboard', width: 100, saiType: 'dict', saiDict: 'dashboard' },
{ prop: 'login_time', label: 'table.columns.system.loginTime', width: 170, sortable: true }, { prop: 'login_time', label: 'page.table.loginTime', width: 170, sortable: true },
{ {
prop: 'operation', prop: 'operation',
label: 'table.actions.operation', label: 'table.actions.operation',

View File

@@ -9,18 +9,18 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.username')" prop="username"> <el-form-item :label="$t('page.search.username')" prop="username">
<el-input v-model="formData.username" :placeholder="$t('table.searchBar.placeholderUsername')" clearable /> <el-input v-model="formData.username" :placeholder="$t('page.search.placeholderUsername')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.system.phone')" prop="phone"> <el-form-item :label="$t('page.search.phone')" prop="phone">
<el-input v-model="formData.phone" :placeholder="$t('table.searchBar.placeholderPhone')" clearable /> <el-input v-model="formData.phone" :placeholder="$t('page.search.placeholderPhone')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.common.status')" prop="status"> <el-form-item :label="$t('page.search.status')" prop="status">
<sa-select v-model="formData.status" dict="data_status" :placeholder="$t('table.searchBar.searchSelectPlaceholder')" clearable /> <sa-select v-model="formData.status" dict="data_status" :placeholder="$t('page.search.searchSelectPlaceholder')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</sa-search-bar> </sa-search-bar>

View File

@@ -217,11 +217,11 @@
}, },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'name', label: 'table.columns.safeguard.tableName' }, { prop: 'name', label: 'page.table.tableName' },
{ prop: 'comment', label: 'table.columns.safeguard.tableComment' }, { prop: 'comment', label: 'page.table.tableComment' },
{ prop: 'engine', label: 'table.columns.safeguard.engine' }, { prop: 'engine', label: 'page.table.engine' },
{ prop: 'collation', label: 'table.columns.safeguard.collation' }, { prop: 'collation', label: 'page.table.collation' },
{ prop: 'create_time', label: 'table.columns.common.createTime' } { prop: 'create_time', label: 'page.table.createTime' }
] ]
} }
}) })

View File

@@ -195,13 +195,13 @@
}, },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection', width: 50 }, { type: 'selection', width: 50 },
{ prop: 'table_name', label: 'table.columns.safeguard.tableName', minWidth: 180, align: 'left' }, { prop: 'table_name', label: 'page.table.tableName', minWidth: 180, align: 'left' },
{ prop: 'table_comment', label: 'table.columns.tool.tableDesc', minWidth: 150, align: 'left' }, { prop: 'table_comment', label: 'page.table.tableDesc', minWidth: 150, align: 'left' },
{ prop: 'template', label: 'table.columns.tool.template', minWidth: 120 }, { prop: 'template', label: 'page.table.template', minWidth: 120 },
{ prop: 'namespace', label: 'table.columns.tool.namespace', minWidth: 120 }, { prop: 'namespace', label: 'page.table.namespace', minWidth: 120 },
{ prop: 'stub', label: 'table.columns.tool.stub', minWidth: 120 }, { prop: 'stub', label: 'page.table.stub', minWidth: 120 },
{ prop: 'tpl_category', label: 'table.columns.tool.tplCategory', minWidth: 120, useSlot: true }, { prop: 'tpl_category', label: 'page.table.tplCategory', minWidth: 120, useSlot: true },
{ prop: 'update_time', label: 'table.columns.common.updateTime', width: 180, sortable: true }, { prop: 'update_time', label: 'page.table.updateTime', width: 180, sortable: true },
{ prop: 'operation', label: 'table.actions.operation', width: 220, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 220, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -8,13 +8,13 @@
@search="handleSearch" @search="handleSearch"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.safeguard.tableName')" prop="table_name"> <el-form-item :label="$t('page.search.tableName')" prop="table_name">
<el-input v-model="formData.table_name" :placeholder="$t('table.searchBar.placeholderTableName')" clearable /> <el-input v-model="formData.table_name" :placeholder="$t('page.search.placeholderTableName')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.searchBar.placeholderDataSource')" prop="source"> <el-form-item :label="$t('page.search.placeholderDataSource')" prop="source">
<el-input v-model="formData.source" :placeholder="$t('table.searchBar.placeholderDataSource')" clearable /> <el-input v-model="formData.source" :placeholder="$t('page.search.placeholderDataSource')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</sa-search-bar> </sa-search-bar>

View File

@@ -115,19 +115,19 @@
core: { core: {
apiFn: api.list, apiFn: api.list,
columnsFactory: () => [ columnsFactory: () => [
{ prop: 'id', label: 'table.columns.common.no', width: 100, align: 'center' }, { prop: 'id', label: 'page.table.no', width: 100, align: 'center' },
{ prop: 'name', label: 'table.columns.tool.taskName', minWidth: 120 }, { prop: 'name', label: 'page.table.taskName', minWidth: 120 },
{ {
prop: 'type', prop: 'type',
label: 'table.columns.tool.taskType', label: 'page.table.taskType',
saiType: 'dict', saiType: 'dict',
saiDict: 'crontab_task_type', saiDict: 'crontab_task_type',
minWidth: 120 minWidth: 120
}, },
{ prop: 'rule', label: 'table.columns.tool.rule', minWidth: 140 }, { prop: 'rule', label: 'page.table.rule', minWidth: 140 },
{ prop: 'target', label: 'table.columns.safeguard.target', minWidth: 200, showOverflowTooltip: true }, { prop: 'target', label: 'page.table.target', minWidth: 200, showOverflowTooltip: true },
{ prop: 'status', label: 'table.columns.common.status', saiType: 'dict', saiDict: 'data_status', width: 100 }, { prop: 'status', label: 'page.table.status', saiType: 'dict', saiDict: 'data_status', width: 100 },
{ prop: 'update_time', label: 'table.columns.tool.updateDate', width: 180, sortable: true }, { prop: 'update_time', label: 'page.table.updateDate', width: 180, sortable: true },
{ prop: 'operation', label: 'table.actions.operation', width: 180, fixed: 'right', useSlot: true } { prop: 'operation', label: 'table.actions.operation', width: 180, fixed: 'right', useSlot: true }
] ]
} }

View File

@@ -212,10 +212,10 @@
}, },
columnsFactory: () => [ columnsFactory: () => [
{ type: 'selection' }, { type: 'selection' },
{ prop: 'create_time', label: 'table.columns.safeguard.executeTime', sortable: true }, { prop: 'create_time', label: 'page.table.executeTime', sortable: true },
{ prop: 'target', label: 'table.columns.safeguard.target' }, { prop: 'target', label: 'page.table.target' },
{ prop: 'parameter', label: 'table.columns.safeguard.parameter' }, { prop: 'parameter', label: 'page.table.parameter' },
{ prop: 'status', label: 'table.columns.safeguard.executeStatus', useSlot: true, width: 100 } { prop: 'status', label: 'page.table.executeStatus', useSlot: true, width: 100 }
] ]
} }
}) })

View File

@@ -9,18 +9,18 @@
@expand="handleExpand" @expand="handleExpand"
> >
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.tool.taskName')" prop="name"> <el-form-item :label="$t('page.search.taskName')" prop="name">
<el-input v-model="formData.name" :placeholder="$t('table.searchBar.placeholderTaskName')" clearable /> <el-input v-model="formData.name" :placeholder="$t('page.search.placeholderTaskName')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.tool.taskType')" prop="type"> <el-form-item :label="$t('page.search.taskType')" prop="type">
<sa-select v-model="formData.type" dict="crontab_task_type" :placeholder="$t('table.searchBar.searchSelectPlaceholder')" clearable /> <sa-select v-model="formData.type" dict="crontab_task_type" :placeholder="$t('page.search.searchSelectPlaceholder')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-bind="setSpan(6)"> <el-col v-bind="setSpan(6)">
<el-form-item :label="$t('table.columns.common.status')" prop="status"> <el-form-item :label="$t('page.search.status')" prop="status">
<sa-select v-model="formData.status" dict="data_status" :placeholder="$t('table.searchBar.searchSelectPlaceholder')" clearable /> <sa-select v-model="formData.status" dict="data_status" :placeholder="$t('page.search.searchSelectPlaceholder')" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</sa-search-bar> </sa-search-bar>