This commit is contained in:
@@ -185,7 +185,20 @@
|
|||||||
{
|
{
|
||||||
prop: 'allocation_no',
|
prop: 'allocation_no',
|
||||||
label: '分配单号',
|
label: '分配单号',
|
||||||
minWidth: 200
|
minWidth: 200,
|
||||||
|
formatter: (row: AssetAllocationRecord) => {
|
||||||
|
return h(
|
||||||
|
'span',
|
||||||
|
{
|
||||||
|
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||||
|
onClick: (e: MouseEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
handleNameClick(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
row.allocation_no
|
||||||
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'allocation_name',
|
prop: 'allocation_name',
|
||||||
@@ -323,14 +336,19 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理名称点击
|
||||||
|
const handleNameClick = (row: AssetAllocationRecord) => {
|
||||||
|
if (hasAuth('asset_assign:view_detail')) {
|
||||||
|
viewDetail(row)
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('您没有查看详情的权限')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 右键菜单项配置
|
// 右键菜单项配置
|
||||||
const contextMenuItems = computed((): MenuItemType[] => {
|
const contextMenuItems = computed((): MenuItemType[] => {
|
||||||
const items: MenuItemType[] = []
|
const items: MenuItemType[] = []
|
||||||
|
|
||||||
if (hasAuth('asset_assign:view_detail')) {
|
|
||||||
items.push({ key: 'detail', label: '详情' })
|
|
||||||
}
|
|
||||||
|
|
||||||
return items
|
return items
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -347,9 +365,7 @@
|
|||||||
if (!currentRow.value) return
|
if (!currentRow.value) return
|
||||||
|
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case 'detail':
|
// No cases available
|
||||||
viewDetail(currentRow.value)
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -225,7 +225,20 @@
|
|||||||
{
|
{
|
||||||
prop: 'iccid',
|
prop: 'iccid',
|
||||||
label: 'ICCID',
|
label: 'ICCID',
|
||||||
minWidth: 200
|
minWidth: 200,
|
||||||
|
formatter: (row: AuthorizationItem) => {
|
||||||
|
return h(
|
||||||
|
'span',
|
||||||
|
{
|
||||||
|
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||||
|
onClick: (e: MouseEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
handleNameClick(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
row.iccid
|
||||||
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'msisdn',
|
prop: 'msisdn',
|
||||||
@@ -354,6 +367,15 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理名称点击
|
||||||
|
const handleNameClick = (row: AuthorizationItem) => {
|
||||||
|
if (hasAuth('authorization_records:view_detail')) {
|
||||||
|
viewDetail(row)
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('您没有查看详情的权限')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 显示修改备注对话框
|
// 显示修改备注对话框
|
||||||
const showRemarkDialog = (row: AuthorizationItem) => {
|
const showRemarkDialog = (row: AuthorizationItem) => {
|
||||||
currentRecordId.value = row.id
|
currentRecordId.value = row.id
|
||||||
@@ -389,10 +411,6 @@
|
|||||||
const contextMenuItems = computed((): MenuItemType[] => {
|
const contextMenuItems = computed((): MenuItemType[] => {
|
||||||
const items: MenuItemType[] = []
|
const items: MenuItemType[] = []
|
||||||
|
|
||||||
if (hasAuth('authorization_records:view_detail')) {
|
|
||||||
items.push({ key: 'detail', label: '详情' })
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasAuth('authorization_records:update_remark')) {
|
if (hasAuth('authorization_records:update_remark')) {
|
||||||
items.push({ key: 'edit', label: '编辑' })
|
items.push({ key: 'edit', label: '编辑' })
|
||||||
}
|
}
|
||||||
@@ -413,9 +431,6 @@
|
|||||||
if (!currentRow.value) return
|
if (!currentRow.value) return
|
||||||
|
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case 'detail':
|
|
||||||
viewDetail(currentRow.value)
|
|
||||||
break
|
|
||||||
case 'edit':
|
case 'edit':
|
||||||
showRemarkDialog(currentRow.value)
|
showRemarkDialog(currentRow.value)
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -247,13 +247,35 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理名称点击
|
||||||
|
const handleNameClick = (row: DeviceImportTask) => {
|
||||||
|
if (hasAuth('device_task:view_detail')) {
|
||||||
|
viewDetail(row)
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('您没有查看详情的权限')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 动态列配置
|
// 动态列配置
|
||||||
const { columnChecks, columns } = useCheckedColumns(() => [
|
const { columnChecks, columns } = useCheckedColumns(() => [
|
||||||
{
|
{
|
||||||
prop: 'task_no',
|
prop: 'task_no',
|
||||||
label: '任务编号',
|
label: '任务编号',
|
||||||
width: 180,
|
width: 180,
|
||||||
showOverflowTooltip: true
|
showOverflowTooltip: true,
|
||||||
|
formatter: (row: DeviceImportTask) => {
|
||||||
|
return h(
|
||||||
|
'span',
|
||||||
|
{
|
||||||
|
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||||
|
onClick: (e: MouseEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
handleNameClick(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
row.task_no
|
||||||
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
@@ -612,10 +634,6 @@
|
|||||||
|
|
||||||
const items: MenuItemType[] = []
|
const items: MenuItemType[] = []
|
||||||
|
|
||||||
if (hasAuth('device_task:view_detail')) {
|
|
||||||
items.push({ key: 'detail', label: '详情' })
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentRow.value.fail_count > 0 && hasAuth('device_task:download_fail_data')) {
|
if (currentRow.value.fail_count > 0 && hasAuth('device_task:download_fail_data')) {
|
||||||
items.push({ key: 'failData', label: '失败数据' })
|
items.push({ key: 'failData', label: '失败数据' })
|
||||||
}
|
}
|
||||||
@@ -636,9 +654,6 @@
|
|||||||
if (!currentRow.value) return
|
if (!currentRow.value) return
|
||||||
|
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case 'detail':
|
|
||||||
viewDetail(currentRow.value)
|
|
||||||
break
|
|
||||||
case 'failData':
|
case 'failData':
|
||||||
downloadFailDataByRow(currentRow.value)
|
downloadFailDataByRow(currentRow.value)
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -282,12 +282,34 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理名称点击
|
||||||
|
const handleNameClick = (row: IotCardImportTask) => {
|
||||||
|
if (hasAuth('iot_card_task:view_detail')) {
|
||||||
|
viewDetail(row)
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('您没有查看详情的权限')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 动态列配置
|
// 动态列配置
|
||||||
const { columnChecks, columns } = useCheckedColumns(() => [
|
const { columnChecks, columns } = useCheckedColumns(() => [
|
||||||
{
|
{
|
||||||
prop: 'task_no',
|
prop: 'task_no',
|
||||||
label: '任务编号',
|
label: '任务编号',
|
||||||
width: 180
|
width: 180,
|
||||||
|
formatter: (row: IotCardImportTask) => {
|
||||||
|
return h(
|
||||||
|
'span',
|
||||||
|
{
|
||||||
|
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||||
|
onClick: (e: MouseEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
handleNameClick(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
row.task_no
|
||||||
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
@@ -666,10 +688,6 @@
|
|||||||
|
|
||||||
const items: MenuItemType[] = []
|
const items: MenuItemType[] = []
|
||||||
|
|
||||||
if (hasAuth('iot_card_task:view_detail')) {
|
|
||||||
items.push({ key: 'detail', label: '详情' })
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentRow.value.fail_count > 0 && hasAuth('iot_card_task:download_fail_data')) {
|
if (currentRow.value.fail_count > 0 && hasAuth('iot_card_task:download_fail_data')) {
|
||||||
items.push({ key: 'failData', label: '失败数据' })
|
items.push({ key: 'failData', label: '失败数据' })
|
||||||
}
|
}
|
||||||
@@ -690,9 +708,6 @@
|
|||||||
if (!currentRow.value) return
|
if (!currentRow.value) return
|
||||||
|
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case 'detail':
|
|
||||||
viewDetail(currentRow.value)
|
|
||||||
break
|
|
||||||
case 'failData':
|
case 'failData':
|
||||||
downloadFailDataByRow(currentRow.value)
|
downloadFailDataByRow(currentRow.value)
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -318,6 +318,15 @@
|
|||||||
{ label: '未提现', prop: 'unwithdraw_commission' }
|
{ label: '未提现', prop: 'unwithdraw_commission' }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// 处理名称点击
|
||||||
|
const handleNameClick = (row: ShopCommissionSummaryItem) => {
|
||||||
|
if (hasAuth('agent_commission:detail')) {
|
||||||
|
showDetail(row)
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('您没有查看详情的权限')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 动态列配置
|
// 动态列配置
|
||||||
const { columnChecks, columns } = useCheckedColumns(() => [
|
const { columnChecks, columns } = useCheckedColumns(() => [
|
||||||
{
|
{
|
||||||
@@ -329,7 +338,20 @@
|
|||||||
prop: 'shop_name',
|
prop: 'shop_name',
|
||||||
label: '店铺名称',
|
label: '店铺名称',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
showOverflowTooltip: true
|
showOverflowTooltip: true,
|
||||||
|
formatter: (row: ShopCommissionSummaryItem) => {
|
||||||
|
return h(
|
||||||
|
'span',
|
||||||
|
{
|
||||||
|
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||||
|
onClick: (e: MouseEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
handleNameClick(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
row.shop_name
|
||||||
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'username',
|
prop: 'username',
|
||||||
@@ -566,9 +588,7 @@
|
|||||||
const contextMenuItems = computed((): MenuItemType[] => {
|
const contextMenuItems = computed((): MenuItemType[] => {
|
||||||
const items: MenuItemType[] = []
|
const items: MenuItemType[] = []
|
||||||
|
|
||||||
if (hasAuth('agent_commission:detail')) {
|
// 移除详情选项,通过点击店铺名称查看详情
|
||||||
items.push({ key: 'detail', label: '详情' })
|
|
||||||
}
|
|
||||||
|
|
||||||
return items
|
return items
|
||||||
})
|
})
|
||||||
@@ -585,11 +605,7 @@
|
|||||||
const handleContextMenuSelect = (item: MenuItemType) => {
|
const handleContextMenuSelect = (item: MenuItemType) => {
|
||||||
if (!currentRow.value) return
|
if (!currentRow.value) return
|
||||||
|
|
||||||
switch (item.key) {
|
// 暂无其他菜单项
|
||||||
case 'detail':
|
|
||||||
showDetail(currentRow.value)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -655,7 +655,20 @@
|
|||||||
{
|
{
|
||||||
prop: 'order_no',
|
prop: 'order_no',
|
||||||
label: t('orderManagement.table.orderNo'),
|
label: t('orderManagement.table.orderNo'),
|
||||||
minWidth: 220
|
minWidth: 220,
|
||||||
|
formatter: (row: Order) => {
|
||||||
|
return h(
|
||||||
|
'span',
|
||||||
|
{
|
||||||
|
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||||
|
onClick: (e: MouseEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
handleNameClick(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
row.order_no
|
||||||
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'order_type',
|
prop: 'order_type',
|
||||||
@@ -1008,6 +1021,15 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理名称点击
|
||||||
|
const handleNameClick = (row: Order) => {
|
||||||
|
if (hasAuth('orders:view_detail')) {
|
||||||
|
showOrderDetail(row)
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('您没有查看详情的权限')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 取消订单
|
// 取消订单
|
||||||
const handleCancelOrder = (row: Order) => {
|
const handleCancelOrder = (row: Order) => {
|
||||||
// 已支付的订单不能取消
|
// 已支付的订单不能取消
|
||||||
@@ -1045,10 +1067,6 @@
|
|||||||
|
|
||||||
const items: MenuItemType[] = []
|
const items: MenuItemType[] = []
|
||||||
|
|
||||||
if (hasAuth('orders:view_detail')) {
|
|
||||||
items.push({ key: 'detail', label: '详情' })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 只有待支付和已支付的订单可以删除
|
// 只有待支付和已支付的订单可以删除
|
||||||
if (
|
if (
|
||||||
(currentRow.value.payment_status === 1 || currentRow.value.payment_status === 2) &&
|
(currentRow.value.payment_status === 1 || currentRow.value.payment_status === 2) &&
|
||||||
@@ -1073,9 +1091,6 @@
|
|||||||
if (!currentRow.value) return
|
if (!currentRow.value) return
|
||||||
|
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case 'detail':
|
|
||||||
showOrderDetail(currentRow.value)
|
|
||||||
break
|
|
||||||
case 'cancel':
|
case 'cancel':
|
||||||
handleCancelOrder(currentRow.value)
|
handleCancelOrder(currentRow.value)
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -459,7 +459,20 @@
|
|||||||
prop: 'package_name',
|
prop: 'package_name',
|
||||||
label: '套餐名称',
|
label: '套餐名称',
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
showOverflowTooltip: true
|
showOverflowTooltip: true,
|
||||||
|
formatter: (row: PackageResponse) => {
|
||||||
|
return h(
|
||||||
|
'span',
|
||||||
|
{
|
||||||
|
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||||
|
onClick: (e: MouseEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
handleNameClick(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
row.package_name
|
||||||
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'series_name',
|
prop: 'series_name',
|
||||||
@@ -555,13 +568,6 @@
|
|||||||
const contextMenuItems = computed((): MenuItemType[] => {
|
const contextMenuItems = computed((): MenuItemType[] => {
|
||||||
const items: MenuItemType[] = []
|
const items: MenuItemType[] = []
|
||||||
|
|
||||||
if (hasAuth('package:detail')) {
|
|
||||||
items.push({
|
|
||||||
key: 'detail',
|
|
||||||
label: '详情'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasAuth('package:edit')) {
|
if (hasAuth('package:edit')) {
|
||||||
items.push({
|
items.push({
|
||||||
key: 'edit',
|
key: 'edit',
|
||||||
@@ -913,6 +919,15 @@
|
|||||||
router.push(`${RoutesAlias.PackageDetail}/${row.id}`)
|
router.push(`${RoutesAlias.PackageDetail}/${row.id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理名称点击
|
||||||
|
const handleNameClick = (row: PackageResponse) => {
|
||||||
|
if (hasAuth('package:detail')) {
|
||||||
|
handleViewDetail(row)
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('您没有查看详情的权限')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 处理表格行右键菜单
|
// 处理表格行右键菜单
|
||||||
const handleRowContextMenu = (row: PackageResponse, column: any, event: MouseEvent) => {
|
const handleRowContextMenu = (row: PackageResponse, column: any, event: MouseEvent) => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
@@ -926,9 +941,6 @@
|
|||||||
if (!currentRow.value) return
|
if (!currentRow.value) return
|
||||||
|
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case 'detail':
|
|
||||||
handleViewDetail(currentRow.value)
|
|
||||||
break
|
|
||||||
case 'edit':
|
case 'edit':
|
||||||
showDialog('edit', currentRow.value)
|
showDialog('edit', currentRow.value)
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -545,7 +545,20 @@
|
|||||||
{
|
{
|
||||||
prop: 'series_name',
|
prop: 'series_name',
|
||||||
label: '系列名称',
|
label: '系列名称',
|
||||||
minWidth: 150
|
minWidth: 150,
|
||||||
|
formatter: (row: PackageSeriesResponse) => {
|
||||||
|
return h(
|
||||||
|
'span',
|
||||||
|
{
|
||||||
|
style: 'color: var(--el-color-primary); cursor: pointer; text-decoration: underline;',
|
||||||
|
onClick: (e: MouseEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
handleNameClick(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
row.series_name
|
||||||
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -723,14 +736,6 @@
|
|||||||
const seriesOperationMenuItems = computed((): MenuItemType[] => {
|
const seriesOperationMenuItems = computed((): MenuItemType[] => {
|
||||||
const items: MenuItemType[] = []
|
const items: MenuItemType[] = []
|
||||||
|
|
||||||
// 详情
|
|
||||||
if (hasAuth('package_series:detail')) {
|
|
||||||
items.push({
|
|
||||||
key: 'detail',
|
|
||||||
label: '详情'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
if (hasAuth('package_series:edit')) {
|
if (hasAuth('package_series:edit')) {
|
||||||
items.push({
|
items.push({
|
||||||
@@ -761,11 +766,7 @@
|
|||||||
// 处理表格行右键菜单
|
// 处理表格行右键菜单
|
||||||
const handleRowContextMenu = (row: PackageSeriesResponse, column: any, event: MouseEvent) => {
|
const handleRowContextMenu = (row: PackageSeriesResponse, column: any, event: MouseEvent) => {
|
||||||
// 如果用户有编辑或删除权限,显示右键菜单
|
// 如果用户有编辑或删除权限,显示右键菜单
|
||||||
if (
|
if (hasAuth('package_series:edit') || hasAuth('package_series:delete')) {
|
||||||
hasAuth('package_series:edit') ||
|
|
||||||
hasAuth('package_series:delete') ||
|
|
||||||
hasAuth('package_series:detail')
|
|
||||||
) {
|
|
||||||
showSeriesOperationMenu(event, row)
|
showSeriesOperationMenu(event, row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -775,9 +776,6 @@
|
|||||||
if (!currentOperatingSeries.value) return
|
if (!currentOperatingSeries.value) return
|
||||||
|
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case 'detail':
|
|
||||||
handleViewDetail(currentOperatingSeries.value)
|
|
||||||
break
|
|
||||||
case 'edit':
|
case 'edit':
|
||||||
showDialog('edit', currentOperatingSeries.value)
|
showDialog('edit', currentOperatingSeries.value)
|
||||||
break
|
break
|
||||||
@@ -1105,6 +1103,15 @@
|
|||||||
const handleViewDetail = (row: PackageSeriesResponse) => {
|
const handleViewDetail = (row: PackageSeriesResponse) => {
|
||||||
router.push(`/package-management/package-series/detail/${row.id}`)
|
router.push(`/package-management/package-series/detail/${row.id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理名称点击
|
||||||
|
const handleNameClick = (row: PackageSeriesResponse) => {
|
||||||
|
if (hasAuth('package_series:detail')) {
|
||||||
|
handleViewDetail(row)
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('您没有查看详情的权限')
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -613,7 +613,20 @@
|
|||||||
{
|
{
|
||||||
prop: 'series_name',
|
prop: 'series_name',
|
||||||
label: '系列名称',
|
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',
|
prop: 'shop_name',
|
||||||
@@ -1287,6 +1300,15 @@
|
|||||||
router.push(`/package-management/series-grants/detail/${row.id}`)
|
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) => {
|
const deleteAllocation = (row: ShopSeriesGrantResponse) => {
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm(
|
||||||
@@ -1392,10 +1414,6 @@
|
|||||||
const contextMenuItems = computed((): MenuItemType[] => {
|
const contextMenuItems = computed((): MenuItemType[] => {
|
||||||
const items: MenuItemType[] = []
|
const items: MenuItemType[] = []
|
||||||
|
|
||||||
if (hasAuth('series_grants:detail')) {
|
|
||||||
items.push({ key: 'detail', label: '详情' })
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasAuth('series_grants:edit')) {
|
if (hasAuth('series_grants:edit')) {
|
||||||
items.push({ key: 'edit', label: '编辑' })
|
items.push({ key: 'edit', label: '编辑' })
|
||||||
}
|
}
|
||||||
@@ -1420,9 +1438,6 @@
|
|||||||
if (!currentRow.value) return
|
if (!currentRow.value) return
|
||||||
|
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case 'detail':
|
|
||||||
handleViewDetail(currentRow.value)
|
|
||||||
break
|
|
||||||
case 'edit':
|
case 'edit':
|
||||||
showDialog('edit', currentRow.value)
|
showDialog('edit', currentRow.value)
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user