refactor:查看 view,统一成详情 detail
parent
64331fb4ac
commit
30a3157e7b
|
@ -0,0 +1,18 @@
|
||||||
|
import type { RouteRecordRaw } from 'vue-router';
|
||||||
|
|
||||||
|
const routes: RouteRecordRaw[] = [
|
||||||
|
{
|
||||||
|
path: '/infra/job/job-log',
|
||||||
|
component: () => import('#/views/infra/job/logger/index.vue'),
|
||||||
|
name: 'InfraJobLog',
|
||||||
|
meta: {
|
||||||
|
title: '调度日志',
|
||||||
|
icon: 'ant-design:history-outlined',
|
||||||
|
activePath: '/infra/job',
|
||||||
|
keepAlive: false,
|
||||||
|
hideInMenu: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export default routes;
|
|
@ -164,7 +164,7 @@ export function useGridColumns<T = InfraApiAccessLogApi.SystemApiAccessLog>(
|
||||||
name: 'CellOperation',
|
name: 'CellOperation',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
code: 'view',
|
code: 'detail',
|
||||||
text: '详情',
|
text: '详情',
|
||||||
show: hasAccessByCodes(['infra:api-access-log:query']),
|
show: hasAccessByCodes(['infra:api-access-log:query']),
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,7 +32,7 @@ async function onExport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查看 API 访问日志详情 */
|
/** 查看 API 访问日志详情 */
|
||||||
function onView(row: InfraApiAccessLogApi.SystemApiAccessLog) {
|
function onDetail(row: InfraApiAccessLogApi.SystemApiAccessLog) {
|
||||||
detailModalApi.setData(row).open();
|
detailModalApi.setData(row).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ function onActionClick({
|
||||||
row,
|
row,
|
||||||
}: OnActionClickParams<InfraApiAccessLogApi.SystemApiAccessLog>) {
|
}: OnActionClickParams<InfraApiAccessLogApi.SystemApiAccessLog>) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'view': {
|
case 'detail': {
|
||||||
onView(row);
|
onDetail(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ export function useGridColumns<T = InfraApiErrorLogApi.SystemApiErrorLog>(
|
||||||
name: 'CellOperation',
|
name: 'CellOperation',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
code: 'view',
|
code: 'detail',
|
||||||
text: '详情',
|
text: '详情',
|
||||||
show: hasAccessByCodes(['infra:api-error-log:query']),
|
show: hasAccessByCodes(['infra:api-error-log:query']),
|
||||||
},
|
},
|
||||||
|
|
|
@ -33,7 +33,7 @@ async function onExport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查看 API 错误日志详情 */
|
/** 查看 API 错误日志详情 */
|
||||||
function onView(row: InfraApiErrorLogApi.SystemApiErrorLog) {
|
function onDetail(row: InfraApiErrorLogApi.SystemApiErrorLog) {
|
||||||
detailModalApi.setData(row).open();
|
detailModalApi.setData(row).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ async function onProcess(id: number, processStatus: number) {
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
content: $t('ui.actionMessage.operationSuccess'),
|
||||||
key: 'action_process_msg',
|
key: 'action_process_msg',
|
||||||
});
|
});
|
||||||
await onRefresh();
|
onRefresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -60,8 +60,8 @@ function onActionClick({
|
||||||
row,
|
row,
|
||||||
}: OnActionClickParams<InfraApiErrorLogApi.SystemApiErrorLog>) {
|
}: OnActionClickParams<InfraApiErrorLogApi.SystemApiErrorLog>) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'view': {
|
case 'detail': {
|
||||||
onView(row);
|
onDetail(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'done': {
|
case 'done': {
|
||||||
|
|
|
@ -202,7 +202,7 @@ export function useGridColumns<T = InfraJobApi.InfraJob>(
|
||||||
},
|
},
|
||||||
// TODO @芋艿:增加一个“更多”选项
|
// TODO @芋艿:增加一个“更多”选项
|
||||||
{
|
{
|
||||||
code: 'view',
|
code: 'detail',
|
||||||
text: '详细',
|
text: '详细',
|
||||||
show: hasAccessByCodes(['infra:job:query']),
|
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();
|
detailModalApi.setData({ id: row.id }).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,8 +139,8 @@ function onActionClick({
|
||||||
onTrigger(row);
|
onTrigger(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'view': {
|
case 'detail': {
|
||||||
onView(row);
|
onDetail(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'log': {
|
case 'log': {
|
||||||
|
|
|
@ -105,7 +105,7 @@ export function useGridColumns<T = SystemLoginLogApi.SystemLoginLog>(
|
||||||
name: 'CellOperation',
|
name: 'CellOperation',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
code: 'view',
|
code: 'detail',
|
||||||
text: '详情',
|
text: '详情',
|
||||||
show: hasAccessByCodes(['system:login-log:query']),
|
show: hasAccessByCodes(['system:login-log:query']),
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,7 +32,7 @@ async function onExport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查看登录日志详情 */
|
/** 查看登录日志详情 */
|
||||||
function onView(row: SystemLoginLogApi.SystemLoginLog) {
|
function onDetail(row: SystemLoginLogApi.SystemLoginLog) {
|
||||||
detailModalApi.setData(row).open();
|
detailModalApi.setData(row).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ function onActionClick({
|
||||||
row,
|
row,
|
||||||
}: OnActionClickParams<SystemLoginLogApi.SystemLoginLog>) {
|
}: OnActionClickParams<SystemLoginLogApi.SystemLoginLog>) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'view': {
|
case 'detail': {
|
||||||
onView(row);
|
onDetail(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ export function useGridColumns<T = SystemMailLogApi.SystemMailLog>(
|
||||||
name: 'CellOperation',
|
name: 'CellOperation',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
code: 'view',
|
code: 'detail',
|
||||||
text: '查看',
|
text: '查看',
|
||||||
show: hasAccessByCodes(['system:mail-log:query']),
|
show: hasAccessByCodes(['system:mail-log:query']),
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ function onRefresh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查看邮件日志 */
|
/** 查看邮件日志 */
|
||||||
function onView(row: SystemMailLogApi.SystemMailLog) {
|
function onDetail(row: SystemMailLogApi.SystemMailLog) {
|
||||||
detailModalApi.setData(row).open();
|
detailModalApi.setData(row).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ function onActionClick({
|
||||||
row,
|
row,
|
||||||
}: OnActionClickParams<SystemMailLogApi.SystemMailLog>) {
|
}: OnActionClickParams<SystemMailLogApi.SystemMailLog>) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'view': {
|
case 'detail': {
|
||||||
onView(row);
|
onDetail(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,8 +154,8 @@ export function useGridColumns<T = SystemNotifyMessageApi.SystemNotifyMessage>(
|
||||||
name: 'CellOperation',
|
name: 'CellOperation',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
code: 'view',
|
code: 'detail',
|
||||||
text: '查看',
|
text: '详情',
|
||||||
show: hasAccessByCodes(['system:notify-message:query']),
|
show: hasAccessByCodes(['system:notify-message:query']),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -22,7 +22,7 @@ function onRefresh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查看站内信详情 */
|
/** 查看站内信详情 */
|
||||||
function onView(row: SystemNotifyMessageApi.SystemNotifyMessage) {
|
function onDetail(row: SystemNotifyMessageApi.SystemNotifyMessage) {
|
||||||
detailModalApi.setData(row).open();
|
detailModalApi.setData(row).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ function onActionClick({
|
||||||
row,
|
row,
|
||||||
}: OnActionClickParams<SystemNotifyMessageApi.SystemNotifyMessage>) {
|
}: OnActionClickParams<SystemNotifyMessageApi.SystemNotifyMessage>) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'view': {
|
case 'detail': {
|
||||||
onView(row);
|
onDetail(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,8 +93,8 @@ export function useGridColumns<T = SystemNotifyMessageApi.SystemNotifyMessage>(
|
||||||
name: 'CellOperation',
|
name: 'CellOperation',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
code: 'view',
|
code: 'detail',
|
||||||
text: '查看',
|
text: '详情',
|
||||||
show: hasAccessByCodes(['system:notify-message:query']),
|
show: hasAccessByCodes(['system:notify-message:query']),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -32,7 +32,7 @@ function onRefresh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查看站内信详情 */
|
/** 查看站内信详情 */
|
||||||
function onView(row: SystemNotifyMessageApi.SystemNotifyMessage) {
|
function onDetail(row: SystemNotifyMessageApi.SystemNotifyMessage) {
|
||||||
// 标记已读
|
// 标记已读
|
||||||
if (!row.readStatus) {
|
if (!row.readStatus) {
|
||||||
handleReadOne(row.id);
|
handleReadOne(row.id);
|
||||||
|
@ -102,8 +102,8 @@ function onActionClick({
|
||||||
row,
|
row,
|
||||||
}: OnActionClickParams<SystemNotifyMessageApi.SystemNotifyMessage>) {
|
}: OnActionClickParams<SystemNotifyMessageApi.SystemNotifyMessage>) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'view': {
|
case 'detail': {
|
||||||
onView(row);
|
onDetail(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,7 @@ export function useGridColumns<T = SystemOperateLogApi.SystemOperateLog>(
|
||||||
name: 'CellOperation',
|
name: 'CellOperation',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
code: 'view',
|
code: 'detail',
|
||||||
text: '详情',
|
text: '详情',
|
||||||
show: hasAccessByCodes(['system:operate-log:query']),
|
show: hasAccessByCodes(['system:operate-log:query']),
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,7 +32,7 @@ async function onExport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查看操作日志详情 */
|
/** 查看操作日志详情 */
|
||||||
function onView(row: SystemOperateLogApi.SystemOperateLog) {
|
function onDetail(row: SystemOperateLogApi.SystemOperateLog) {
|
||||||
detailModalApi.setData(row).open();
|
detailModalApi.setData(row).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ function onActionClick({
|
||||||
row,
|
row,
|
||||||
}: OnActionClickParams<SystemOperateLogApi.SystemOperateLog>) {
|
}: OnActionClickParams<SystemOperateLogApi.SystemOperateLog>) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'view': {
|
case 'detail': {
|
||||||
onView(row);
|
onDetail(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,8 +177,8 @@ export function useGridColumns<T = SystemSmsLogApi.SystemSmsLog>(
|
||||||
name: 'CellOperation',
|
name: 'CellOperation',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
code: 'view',
|
code: 'detail',
|
||||||
text: '查看',
|
text: '详情',
|
||||||
show: hasAccessByCodes(['system:sms-log:query']),
|
show: hasAccessByCodes(['system:sms-log:query']),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -32,7 +32,7 @@ async function onExport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查看短信日志详情 */
|
/** 查看短信日志详情 */
|
||||||
function onView(row: SystemSmsLogApi.SystemSmsLog) {
|
function onDetail(row: SystemSmsLogApi.SystemSmsLog) {
|
||||||
detailModalApi.setData(row).open();
|
detailModalApi.setData(row).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ function onActionClick({
|
||||||
row,
|
row,
|
||||||
}: OnActionClickParams<SystemSmsLogApi.SystemSmsLog>) {
|
}: OnActionClickParams<SystemSmsLogApi.SystemSmsLog>) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'view': {
|
case 'detail': {
|
||||||
onView(row);
|
onDetail(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ export function useGridColumns<T = SystemSocialUserApi.SystemSocialUser>(
|
||||||
name: 'CellOperation',
|
name: 'CellOperation',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
code: 'view',
|
code: 'detail',
|
||||||
text: '详情',
|
text: '详情',
|
||||||
show: hasAccessByCodes(['system:social-user:query']),
|
show: hasAccessByCodes(['system:social-user:query']),
|
||||||
},
|
},
|
||||||
|
|
|
@ -21,7 +21,7 @@ function onRefresh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查看详情 */
|
/** 查看详情 */
|
||||||
function onView(row: SystemSocialUserApi.SystemSocialUser) {
|
function onDetail(row: SystemSocialUserApi.SystemSocialUser) {
|
||||||
detailModalApi.setData(row).open();
|
detailModalApi.setData(row).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ function onActionClick({
|
||||||
row,
|
row,
|
||||||
}: OnActionClickParams<SystemSocialUserApi.SystemSocialUser>) {
|
}: OnActionClickParams<SystemSocialUserApi.SystemSocialUser>) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'view': {
|
case 'detail': {
|
||||||
onView(row);
|
onDetail(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue