详情修改
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m48s

This commit is contained in:
sexygoat
2026-03-06 17:51:27 +08:00
parent 1ebc0b8929
commit 8fbc321a5e
9 changed files with 211 additions and 85 deletions

View File

@@ -613,7 +613,20 @@
{
prop: 'series_name',
label: '系列名称',
minWidth: 150
minWidth: 150,
formatter: (row: ShopSeriesGrantResponse) => {
return h(
'span',
{
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
onClick: (e: MouseEvent) => {
e.stopPropagation()
handleNameClick(row)
}
},
row.series_name
)
}
},
{
prop: 'shop_name',
@@ -1287,6 +1300,15 @@
router.push(`/package-management/series-grants/detail/${row.id}`)
}
// 处理名称点击
const handleNameClick = (row: ShopSeriesGrantResponse) => {
if (hasAuth('series_grants:detail')) {
handleViewDetail(row)
} else {
ElMessage.warning('您没有查看详情的权限')
}
}
// 删除分配
const deleteAllocation = (row: ShopSeriesGrantResponse) => {
ElMessageBox.confirm(
@@ -1392,10 +1414,6 @@
const contextMenuItems = computed((): MenuItemType[] => {
const items: MenuItemType[] = []
if (hasAuth('series_grants:detail')) {
items.push({ key: 'detail', label: '详情' })
}
if (hasAuth('series_grants:edit')) {
items.push({ key: 'edit', label: '编辑' })
}
@@ -1420,9 +1438,6 @@
if (!currentRow.value) return
switch (item.key) {
case 'detail':
handleViewDetail(currentRow.value)
break
case 'edit':
showDialog('edit', currentRow.value)
break