refactor:查看 view,统一成详情 detail
This commit is contained in:
@@ -164,7 +164,7 @@ export function useGridColumns<T = InfraApiAccessLogApi.SystemApiAccessLog>(
|
||||
name: 'CellOperation',
|
||||
options: [
|
||||
{
|
||||
code: 'view',
|
||||
code: 'detail',
|
||||
text: '详情',
|
||||
show: hasAccessByCodes(['infra:api-access-log:query']),
|
||||
},
|
||||
|
||||
@@ -32,7 +32,7 @@ async function onExport() {
|
||||
}
|
||||
|
||||
/** 查看 API 访问日志详情 */
|
||||
function onView(row: InfraApiAccessLogApi.SystemApiAccessLog) {
|
||||
function onDetail(row: InfraApiAccessLogApi.SystemApiAccessLog) {
|
||||
detailModalApi.setData(row).open();
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ function onActionClick({
|
||||
row,
|
||||
}: OnActionClickParams<InfraApiAccessLogApi.SystemApiAccessLog>) {
|
||||
switch (code) {
|
||||
case 'view': {
|
||||
onView(row);
|
||||
case 'detail': {
|
||||
onDetail(row);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ export function useGridColumns<T = InfraApiErrorLogApi.SystemApiErrorLog>(
|
||||
name: 'CellOperation',
|
||||
options: [
|
||||
{
|
||||
code: 'view',
|
||||
code: 'detail',
|
||||
text: '详情',
|
||||
show: hasAccessByCodes(['infra:api-error-log:query']),
|
||||
},
|
||||
|
||||
@@ -33,7 +33,7 @@ async function onExport() {
|
||||
}
|
||||
|
||||
/** 查看 API 错误日志详情 */
|
||||
function onView(row: InfraApiErrorLogApi.SystemApiErrorLog) {
|
||||
function onDetail(row: InfraApiErrorLogApi.SystemApiErrorLog) {
|
||||
detailModalApi.setData(row).open();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ async function onProcess(id: number, processStatus: number) {
|
||||
content: $t('ui.actionMessage.operationSuccess'),
|
||||
key: 'action_process_msg',
|
||||
});
|
||||
await onRefresh();
|
||||
onRefresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -60,8 +60,8 @@ function onActionClick({
|
||||
row,
|
||||
}: OnActionClickParams<InfraApiErrorLogApi.SystemApiErrorLog>) {
|
||||
switch (code) {
|
||||
case 'view': {
|
||||
onView(row);
|
||||
case 'detail': {
|
||||
onDetail(row);
|
||||
break;
|
||||
}
|
||||
case 'done': {
|
||||
|
||||
@@ -202,7 +202,7 @@ export function useGridColumns<T = InfraJobApi.InfraJob>(
|
||||
},
|
||||
// TODO @芋艿:增加一个“更多”选项
|
||||
{
|
||||
code: 'view',
|
||||
code: 'detail',
|
||||
text: '详细',
|
||||
show: hasAccessByCodes(['infra:job:query']),
|
||||
},
|
||||
|
||||
@@ -53,7 +53,7 @@ function onEdit(row: InfraJobApi.InfraJob) {
|
||||
}
|
||||
|
||||
/** 查看任务详情 */
|
||||
function onView(row: InfraJobApi.InfraJob) {
|
||||
function onDetail(row: InfraJobApi.InfraJob) {
|
||||
detailModalApi.setData({ id: row.id }).open();
|
||||
}
|
||||
|
||||
@@ -139,8 +139,8 @@ function onActionClick({
|
||||
onTrigger(row);
|
||||
break;
|
||||
}
|
||||
case 'view': {
|
||||
onView(row);
|
||||
case 'detail': {
|
||||
onDetail(row);
|
||||
break;
|
||||
}
|
||||
case 'log': {
|
||||
|
||||
Reference in New Issue
Block a user