From 6877c9caa25162e570a3e2a99a5b2ce3ef88368b Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期一, 13 四月 2026 13:48:37 +0800
Subject: [PATCH] #页面优化
---
rsf-design/src/views/system/dict-type/dictTypeTable.columns.js | 72 +++++++++++++++++++++++++----------
1 files changed, 51 insertions(+), 21 deletions(-)
diff --git a/rsf-design/src/views/system/dict-type/dictTypeTable.columns.js b/rsf-design/src/views/system/dict-type/dictTypeTable.columns.js
index 5426adc..4211382 100644
--- a/rsf-design/src/views/system/dict-type/dictTypeTable.columns.js
+++ b/rsf-design/src/views/system/dict-type/dictTypeTable.columns.js
@@ -1,62 +1,92 @@
import { h } from 'vue'
import { ElTag } from 'element-plus'
import ArtButtonTable from '@/components/core/forms/art-button-table/index.vue'
+import { $t } from '@/locales'
-export function createDictTypeTableColumns({ handleView, handleEdit, handleDelete }) {
+export function createDictTypeTableColumns({
+ handleView,
+ handleEdit,
+ handleDelete,
+ handleManageData,
+ t = $t
+}) {
+ const hasStandaloneView = !handleManageData && handleView
+
return [
{
prop: 'code',
- label: '缂栫爜',
+ label: t('table.code'),
minWidth: 180,
showOverflowTooltip: true
},
{
prop: 'name',
- label: '鍚嶇О',
+ label: t('table.name'),
minWidth: 180,
showOverflowTooltip: true
},
{
prop: 'description',
- label: '鎻忚堪',
+ label: t('pages.system.dictType.table.description'),
minWidth: 220,
showOverflowTooltip: true,
- formatter: (row) => row.description || '-'
+ formatter: (row) => row.description || t('common.placeholder.empty')
},
{
prop: 'status',
- label: '鐘舵��',
+ label: t('table.status'),
width: 100,
- formatter: (row) => h(ElTag, { type: row.statusType, effect: 'light' }, () => row.statusText || '-')
+ formatter: (row) =>
+ h(
+ ElTag,
+ { type: row.statusType, effect: 'light' },
+ () => row.statusText || t('common.placeholder.empty')
+ )
},
{
prop: 'updateByLabel',
- label: '鏇存柊浜�',
+ label: t('table.updateBy'),
width: 120,
- formatter: (row) => row.updateByLabel || '-'
+ formatter: (row) => row.updateByLabel || t('common.placeholder.empty')
},
{
prop: 'updateTimeText',
- label: '鏇存柊鏃堕棿',
+ label: t('table.updateTime'),
minWidth: 180,
- formatter: (row) => row.updateTimeText || '-'
+ formatter: (row) => row.updateTimeText || t('common.placeholder.empty')
},
{
prop: 'operation',
- label: '鎿嶄綔',
- width: handleDelete ? 160 : 120,
- align: 'right',
+ label: t('table.operation'),
+ width: handleDelete ? (hasStandaloneView ? 200 : 240) : hasStandaloneView ? 160 : 200,
+ align: 'center',
formatter: (row) => {
- const buttons = [
- h(ArtButtonTable, {
- type: 'view',
- onClick: () => handleView(row)
- }),
+ const buttons = []
+
+ if (handleManageData) {
+ buttons.push(
+ h(ArtButtonTable, {
+ type: 'view',
+ onClick: () => handleManageData(row)
+ })
+ )
+ }
+
+ if (hasStandaloneView) {
+ buttons.push(
+ h(ArtButtonTable, {
+ type: 'view',
+ onClick: () => handleView(row)
+ })
+ )
+ }
+
+ buttons.push(
h(ArtButtonTable, {
type: 'edit',
onClick: () => handleEdit(row)
})
- ]
+ )
if (handleDelete) {
buttons.push(
@@ -67,7 +97,7 @@
)
}
- return h('div', { class: 'flex justify-end' }, buttons)
+ return h('div', { class: 'flex items-center justify-center gap-2' }, buttons)
}
}
]
--
Gitblit v1.9.1