fix: 🧩 删除登录日志不需要内容
This commit is contained in:
parent
9864e8afa6
commit
623168769f
|
@ -6,11 +6,6 @@ export const fetchGetQuartzExecuteLogList = (data: any) => {
|
||||||
return http.request<BaseResult<ResultTable>>('get', `quartzExecuteLog/getQuartzExecuteLogList/${data.currentPage}/${data.pageSize}`, { params: data });
|
return http.request<BaseResult<ResultTable>>('get', `quartzExecuteLog/getQuartzExecuteLogList/${data.currentPage}/${data.pageSize}`, { params: data });
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 调度任务执行日志---更新调度任务执行日志 */
|
|
||||||
export const fetchUpdateQuartzExecuteLog = (data: any) => {
|
|
||||||
return http.request<BaseResult<object>>('put', 'quartzExecuteLog/updateQuartzExecuteLog', { data });
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 调度任务执行日志---删除调度任务执行日志 */
|
/** 调度任务执行日志---删除调度任务执行日志 */
|
||||||
export const fetchDeleteQuartzExecuteLog = (data: any) => {
|
export const fetchDeleteQuartzExecuteLog = (data: any) => {
|
||||||
return http.request<BaseResult<object>>('delete', 'quartzExecuteLog/deleteQuartzExecuteLog', { data });
|
return http.request<BaseResult<object>>('delete', 'quartzExecuteLog/deleteQuartzExecuteLog', { data });
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { fetchDeleteQuartzExecuteLog, fetchGetQuartzExecuteLogList, fetchUpdateQuartzExecuteLog } from '@/api/v1/quartzExecuteLog';
|
import { fetchDeleteQuartzExecuteLog, fetchGetQuartzExecuteLogList } from '@/api/v1/quartzExecuteLog';
|
||||||
import { pageSizes } from '@/enums/baseConstant';
|
import { pageSizes } from '@/enums/baseConstant';
|
||||||
import { storeMessage } from '@/utils/message';
|
import { storeMessage } from '@/utils/message';
|
||||||
import { storePagination } from '@/store/useStorePagination';
|
import { storePagination } from '@/store/useStorePagination';
|
||||||
|
@ -56,12 +56,6 @@ export const useQuartzExecuteLogStore = defineStore('quartzExecuteLogStore', {
|
||||||
return pagination(result);
|
return pagination(result);
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 修改调度任务执行日志 */
|
|
||||||
async updateQuartzExecuteLog(data: any) {
|
|
||||||
const result = await fetchUpdateQuartzExecuteLog(data);
|
|
||||||
return storeMessage(result);
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 删除调度任务执行日志 */
|
/** 删除调度任务执行日志 */
|
||||||
async deleteQuartzExecuteLog(data: any) {
|
async deleteQuartzExecuteLog(data: any) {
|
||||||
const result = await fetchDeleteQuartzExecuteLog(data);
|
const result = await fetchDeleteQuartzExecuteLog(data);
|
||||||
|
|
|
@ -21,11 +21,13 @@ export const useUserLoginLogStore = defineStore('userLoginLogStore', {
|
||||||
// 登录token
|
// 登录token
|
||||||
token: undefined,
|
token: undefined,
|
||||||
// 登录Ip
|
// 登录Ip
|
||||||
ip: undefined,
|
ipRegion: undefined,
|
||||||
// 登录Ip地点
|
// 登录Ip地点
|
||||||
ipAddress: undefined,
|
ipAddress: undefined,
|
||||||
// 登录时代理
|
// 登录时代理
|
||||||
userAgent: undefined,
|
userAgent: undefined,
|
||||||
|
// 操作类型
|
||||||
|
type: undefined,
|
||||||
},
|
},
|
||||||
// 分页查询结果
|
// 分页查询结果
|
||||||
pagination: {
|
pagination: {
|
||||||
|
|
|
@ -3,9 +3,8 @@ import { onMounted, ref } from 'vue';
|
||||||
import { columns } from '@/views/monitor/schedulerExecuteLog/utils/columns';
|
import { columns } from '@/views/monitor/schedulerExecuteLog/utils/columns';
|
||||||
import PureTableBar from '@/components/TableBar/src/bar';
|
import PureTableBar from '@/components/TableBar/src/bar';
|
||||||
import PureTable from '@pureadmin/table';
|
import PureTable from '@pureadmin/table';
|
||||||
import { deleteIds, onDelete, onDeleteBatch, onSearch, onUpdate } from '@/views/monitor/schedulerExecuteLog/utils/hooks';
|
import { deleteIds, onDelete, onDeleteBatch, onSearch } from '@/views/monitor/schedulerExecuteLog/utils/hooks';
|
||||||
import Delete from '@iconify-icons/ep/delete';
|
import Delete from '@iconify-icons/ep/delete';
|
||||||
import EditPen from '@iconify-icons/ep/edit-pen';
|
|
||||||
import Refresh from '@iconify-icons/ep/refresh';
|
import Refresh from '@iconify-icons/ep/refresh';
|
||||||
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
|
@ -122,7 +121,6 @@ onMounted(() => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
|
||||||
<el-popconfirm :title="`${$t('delete')}${row.jobName}?`" @confirm="onDelete(row)">
|
<el-popconfirm :title="`${$t('delete')}${row.jobName}?`" @confirm="onDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
|
|
|
@ -1,77 +0,0 @@
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { FormInstance } from 'element-plus';
|
|
||||||
import { rules } from '@/views/monitor/schedulerExecuteLog/utils/columns';
|
|
||||||
import { FormProps } from '@/views/monitor/schedulerExecuteLog/utils/types';
|
|
||||||
import { $t } from '@/plugins/i18n';
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<FormProps>(), {
|
|
||||||
formInline: () => ({
|
|
||||||
// 任务名称
|
|
||||||
jobName: undefined,
|
|
||||||
// 任务分组
|
|
||||||
jobGroup: undefined,
|
|
||||||
// 执行任务类名
|
|
||||||
jobClassName: undefined,
|
|
||||||
// 执行任务core表达式
|
|
||||||
cronExpression: undefined,
|
|
||||||
// 触发器名称
|
|
||||||
triggerName: undefined,
|
|
||||||
// 执行结果
|
|
||||||
executeResult: undefined,
|
|
||||||
// 执行时间
|
|
||||||
duration: undefined,
|
|
||||||
// 结束时间
|
|
||||||
endTime: undefined,
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
|
|
||||||
const formRef = ref<FormInstance>();
|
|
||||||
const form = ref(props.formInline);
|
|
||||||
|
|
||||||
defineExpose({ formRef });
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="auto">
|
|
||||||
<!-- 任务名称 -->
|
|
||||||
<el-form-item :label="$t('quartzExecuteLog_jobName')" prop="jobName">
|
|
||||||
<el-input v-model="form.jobName" :placeholder="$t('input') + $t('quartzExecuteLog_jobName')" autocomplete="off" type="text" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- 任务分组 -->
|
|
||||||
<el-form-item :label="$t('quartzExecuteLog_jobGroup')" prop="jobGroup">
|
|
||||||
<el-input v-model="form.jobGroup" :placeholder="$t('input') + $t('quartzExecuteLog_jobGroup')" autocomplete="off" type="text" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- 执行任务类名 -->
|
|
||||||
<el-form-item :label="$t('quartzExecuteLog_jobClassName')" prop="jobClassName">
|
|
||||||
<el-input v-model="form.jobClassName" :placeholder="$t('input') + $t('quartzExecuteLog_jobClassName')" autocomplete="off" type="text" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- 执行任务core表达式 -->
|
|
||||||
<el-form-item :label="$t('quartzExecuteLog_cronExpression')" prop="cronExpression">
|
|
||||||
<el-input v-model="form.cronExpression" :placeholder="$t('input') + $t('quartzExecuteLog_cronExpression')" autocomplete="off" type="text" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- 触发器名称 -->
|
|
||||||
<el-form-item :label="$t('quartzExecuteLog_triggerName')" prop="triggerName">
|
|
||||||
<el-input v-model="form.triggerName" :placeholder="$t('input') + $t('quartzExecuteLog_triggerName')" autocomplete="off" type="text" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- 执行结果 -->
|
|
||||||
<el-form-item :label="$t('quartzExecuteLog_executeResult')" prop="executeResult">
|
|
||||||
<el-input v-model="form.executeResult" :placeholder="$t('input') + $t('quartzExecuteLog_executeResult')" autocomplete="off" type="text" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- 执行时间 -->
|
|
||||||
<el-form-item :label="$t('quartzExecuteLog_duration')" prop="duration">
|
|
||||||
<el-input v-model="form.duration" :placeholder="$t('input') + $t('quartzExecuteLog_duration')" autocomplete="off" type="text" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- 结束时间 -->
|
|
||||||
<el-form-item :label="$t('quartzExecuteLog_endTime')" prop="endTime">
|
|
||||||
<el-input v-model="form.endTime" :placeholder="$t('input') + $t('quartzExecuteLog_endTime')" autocomplete="off" type="text" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { reactive } from 'vue';
|
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
|
|
||||||
// 表格列
|
// 表格列
|
||||||
|
@ -25,37 +24,5 @@ export const columns: TableColumnList = [
|
||||||
{ label: $t('table.createTime'), prop: 'createTime', sortable: true, width: 160 },
|
{ label: $t('table.createTime'), prop: 'createTime', sortable: true, width: 160 },
|
||||||
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 90 },
|
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 90 },
|
||||||
{ label: $t('table.updateUser'), prop: 'updateUser', slot: 'updateUser', width: 90 },
|
{ label: $t('table.updateUser'), prop: 'updateUser', slot: 'updateUser', width: 90 },
|
||||||
{ label: $t('table.operation'), fixed: 'right', width: 210, slot: 'operation' },
|
{ label: $t('table.operation'), fixed: 'right', width: 100, slot: 'operation' },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 添加规则
|
|
||||||
export const rules = reactive({
|
|
||||||
// 任务名称
|
|
||||||
jobName: [{ required: true, message: `${$t('input')}${$t('quartzExecuteLog_jobName')}`, trigger: 'blur' }],
|
|
||||||
// 任务分组
|
|
||||||
jobGroup: [{ required: true, message: `${$t('input')}${$t('quartzExecuteLog_jobGroup')}`, trigger: 'blur' }],
|
|
||||||
// 执行任务类名
|
|
||||||
jobClassName: [{ required: true, message: `${$t('input')}${$t('quartzExecuteLog_jobClassName')}`, trigger: 'blur' }],
|
|
||||||
// 执行任务core表达式
|
|
||||||
cronExpression: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: `${$t('input')}${$t('quartzExecuteLog_cronExpression')}`,
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
// 触发器名称
|
|
||||||
triggerName: [{ required: true, message: `${$t('input')}${$t('quartzExecuteLog_triggerName')}`, trigger: 'blur' }],
|
|
||||||
// 执行结果
|
|
||||||
executeResult: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: `${$t('input')}${$t('quartzExecuteLog_executeResult')}`,
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
// 执行时间
|
|
||||||
duration: [{ required: true, message: `${$t('input')}${$t('quartzExecuteLog_duration')}`, trigger: 'blur' }],
|
|
||||||
// 结束时间
|
|
||||||
endTime: [{ required: true, message: `${$t('input')}${$t('quartzExecuteLog_endTime')}`, trigger: 'blur' }],
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
import { addDialog } from '@/components/BaseDialog/index';
|
|
||||||
import QuartzExecuteLogDialog from '@/views/monitor/schedulerExecuteLog/quartz-execute-log-dialog.vue';
|
|
||||||
import { useQuartzExecuteLogStore } from '@/store/monitor/quartzExecuteLog';
|
import { useQuartzExecuteLogStore } from '@/store/monitor/quartzExecuteLog';
|
||||||
import { h, ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { messageBox } from '@/utils/message';
|
import { messageBox } from '@/utils/message';
|
||||||
import type { FormItemProps } from '@/views/monitor/schedulerExecuteLog/utils/types';
|
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
|
|
||||||
export const formRef = ref();
|
export const formRef = ref();
|
||||||
|
@ -20,44 +17,6 @@ export async function onSearch() {
|
||||||
quartzExecuteLogStore.loading = false;
|
quartzExecuteLogStore.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* * 更新调度任务执行日志
|
|
||||||
* @param row
|
|
||||||
*/
|
|
||||||
export function onUpdate(row: any) {
|
|
||||||
addDialog({
|
|
||||||
title: `${$t('modify')}${$t('quartzExecuteLog')}`,
|
|
||||||
width: '30%',
|
|
||||||
props: {
|
|
||||||
formInline: {
|
|
||||||
jobName: row.jobName,
|
|
||||||
jobGroup: row.jobGroup,
|
|
||||||
jobClassName: row.jobClassName,
|
|
||||||
cronExpression: row.cronExpression,
|
|
||||||
triggerName: row.triggerName,
|
|
||||||
executeResult: row.executeResult,
|
|
||||||
duration: row.duration,
|
|
||||||
endTime: row.endTime,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
draggable: true,
|
|
||||||
fullscreenIcon: true,
|
|
||||||
closeOnClickModal: false,
|
|
||||||
contentRenderer: () => h(QuartzExecuteLogDialog, { ref: formRef }),
|
|
||||||
beforeSure: (done, { options }) => {
|
|
||||||
const form = options.props.formInline as FormItemProps;
|
|
||||||
formRef.value.formRef.validate(async (valid: any) => {
|
|
||||||
if (!valid) return;
|
|
||||||
|
|
||||||
const result = await quartzExecuteLogStore.updateQuartzExecuteLog({ ...form, id: row.id });
|
|
||||||
if (!result) return;
|
|
||||||
done();
|
|
||||||
await onSearch();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * 删除调度任务执行日志
|
* * 删除调度任务执行日志
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -69,8 +69,8 @@ onMounted(() => {
|
||||||
<el-form-item :label="$t('userLoginLog_token')" prop="token">
|
<el-form-item :label="$t('userLoginLog_token')" prop="token">
|
||||||
<el-input v-model="userLoginLogStore.form.token" :placeholder="`${$t('input')}${$t('userLoginLog_token')}`" class="!w-[180px]" clearable />
|
<el-input v-model="userLoginLogStore.form.token" :placeholder="`${$t('input')}${$t('userLoginLog_token')}`" class="!w-[180px]" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('userLoginLog_ip')" prop="ip">
|
<el-form-item :label="$t('userLoginLog_ipRegion')" prop="ip">
|
||||||
<el-input v-model="userLoginLogStore.form.ip" :placeholder="`${$t('input')}${$t('userLoginLog_ip')}`" class="!w-[180px]" clearable />
|
<el-input v-model="userLoginLogStore.form.ipRegion" :placeholder="`${$t('input')}${$t('userLoginLog_ipRegion')}`" class="!w-[180px]" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('userLoginLog_ipAddress')" prop="ipAddress">
|
<el-form-item :label="$t('userLoginLog_ipAddress')" prop="ipAddress">
|
||||||
<el-input v-model="userLoginLogStore.form.ipAddress" :placeholder="`${$t('input')}${$t('userLoginLog_ipAddress')}`" class="!w-[180px]" clearable />
|
<el-input v-model="userLoginLogStore.form.ipAddress" :placeholder="`${$t('input')}${$t('userLoginLog_ipAddress')}`" class="!w-[180px]" clearable />
|
||||||
|
@ -78,6 +78,9 @@ onMounted(() => {
|
||||||
<el-form-item :label="$t('userLoginLog_userAgent')" prop="userAgent">
|
<el-form-item :label="$t('userLoginLog_userAgent')" prop="userAgent">
|
||||||
<el-input v-model="userLoginLogStore.form.userAgent" :placeholder="`${$t('input')}${$t('userLoginLog_userAgent')}`" class="!w-[180px]" clearable />
|
<el-input v-model="userLoginLogStore.form.userAgent" :placeholder="`${$t('input')}${$t('userLoginLog_userAgent')}`" class="!w-[180px]" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('userLoginLog_type')" prop="type">
|
||||||
|
<el-input v-model="userLoginLogStore.form.type" :placeholder="`${$t('input')}${$t('userLoginLog_type')}`" class="!w-[180px]" clearable />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button :icon="useRenderIcon('ri:search-line')" :loading="userLoginLogStore.loading" type="primary" @click="onSearch"> {{ $t('search') }} </el-button>
|
<el-button :icon="useRenderIcon('ri:search-line')" :loading="userLoginLogStore.loading" type="primary" @click="onSearch"> {{ $t('search') }} </el-button>
|
||||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
||||||
|
@ -114,11 +117,15 @@ onMounted(() => {
|
||||||
@page-current-change="onCurrentPageChange"
|
@page-current-change="onCurrentPageChange"
|
||||||
>
|
>
|
||||||
<template #createUser="{ row }">
|
<template #createUser="{ row }">
|
||||||
<el-button link type="primary" @click="selectUserinfo(row.createUser)">{{ $t('table.createUser') }} </el-button>
|
<el-button v-show="row.createUser" link type="primary" @click="selectUserinfo(row.createUser)">
|
||||||
|
{{ $t('table.createUser') }}
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #updateUser="{ row }">
|
<template #updateUser="{ row }">
|
||||||
<el-button link type="primary" @click="selectUserinfo(row.updateUser)">{{ $t('table.updateUser') }} </el-button>
|
<el-button v-show="row.updateUser" link type="primary" @click="selectUserinfo(row.updateUser)">
|
||||||
|
{{ $t('table.updateUser') }}
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
|
|
|
@ -14,7 +14,7 @@ const props = withDefaults(defineProps<FormProps>(), {
|
||||||
// 登录token
|
// 登录token
|
||||||
token: undefined,
|
token: undefined,
|
||||||
// 登录Ip
|
// 登录Ip
|
||||||
ip: undefined,
|
ipRegion: undefined,
|
||||||
// 登录Ip地点
|
// 登录Ip地点
|
||||||
ipAddress: undefined,
|
ipAddress: undefined,
|
||||||
// 登录时代理
|
// 登录时代理
|
||||||
|
@ -46,8 +46,8 @@ defineExpose({ formRef });
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- 登录Ip -->
|
<!-- 登录Ip -->
|
||||||
<el-form-item :label="$t('userLoginLog_ip')" prop="ip">
|
<el-form-item :label="$t('userLoginLog_ipRegion')" prop="ip">
|
||||||
<el-input v-model="form.ip" :placeholder="$t('input') + $t('userLoginLog_ip')" autocomplete="off" type="text" />
|
<el-input v-model="form.ipRegion" :placeholder="$t('input') + $t('userLoginLog_ipRegion')" autocomplete="off" type="text" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- 登录Ip地点 -->
|
<!-- 登录Ip地点 -->
|
||||||
|
|
|
@ -12,11 +12,13 @@ export const columns: TableColumnList = [
|
||||||
// 登录token
|
// 登录token
|
||||||
{ label: $t('userLoginLog_token'), prop: 'token' },
|
{ label: $t('userLoginLog_token'), prop: 'token' },
|
||||||
// 登录Ip
|
// 登录Ip
|
||||||
{ label: $t('userLoginLog_ip'), prop: 'ip' },
|
|
||||||
// 登录Ip地点
|
|
||||||
{ label: $t('userLoginLog_ipAddress'), prop: 'ipAddress' },
|
{ label: $t('userLoginLog_ipAddress'), prop: 'ipAddress' },
|
||||||
|
// 登录Ip地点
|
||||||
|
{ label: $t('userLoginLog_ipRegion'), prop: 'ipRegion' },
|
||||||
// 登录时代理
|
// 登录时代理
|
||||||
{ label: $t('userLoginLog_userAgent'), prop: 'userAgent' },
|
{ label: $t('userLoginLog_userAgent'), prop: 'userAgent' },
|
||||||
|
// 操作类型
|
||||||
|
{ label: $t('userLoginLog_type'), prop: 'type' },
|
||||||
{ label: $t('table.updateTime'), prop: 'updateTime', sortable: true, width: 160 },
|
{ label: $t('table.updateTime'), prop: 'updateTime', sortable: true, width: 160 },
|
||||||
{ label: $t('table.createTime'), prop: 'createTime', sortable: true, width: 160 },
|
{ label: $t('table.createTime'), prop: 'createTime', sortable: true, width: 160 },
|
||||||
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 90 },
|
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 90 },
|
||||||
|
@ -24,18 +26,4 @@ export const columns: TableColumnList = [
|
||||||
{ label: $t('table.operation'), fixed: 'right', width: 210, slot: 'operation' },
|
{ label: $t('table.operation'), fixed: 'right', width: 210, slot: 'operation' },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 添加规则
|
export const rules = reactive({});
|
||||||
export const rules = reactive({
|
|
||||||
// 用户Id
|
|
||||||
userId: [{ required: true, message: `${$t('input')}${$t('userLoginLog_userId')}`, trigger: 'blur' }],
|
|
||||||
// 用户名
|
|
||||||
username: [{ required: true, message: `${$t('input')}${$t('userLoginLog_username')}`, trigger: 'blur' }],
|
|
||||||
// 登录token
|
|
||||||
token: [{ required: true, message: `${$t('input')}${$t('userLoginLog_token')}`, trigger: 'blur' }],
|
|
||||||
// 登录Ip
|
|
||||||
ip: [{ required: true, message: `${$t('input')}${$t('userLoginLog_ip')}`, trigger: 'blur' }],
|
|
||||||
// 登录Ip地点
|
|
||||||
ipAddress: [{ required: true, message: `${$t('input')}${$t('userLoginLog_ipAddress')}`, trigger: 'blur' }],
|
|
||||||
// 登录时代理
|
|
||||||
userAgent: [{ required: true, message: `${$t('input')}${$t('userLoginLog_userAgent')}`, trigger: 'blur' }],
|
|
||||||
});
|
|
||||||
|
|
|
@ -33,9 +33,10 @@ export function onUpdate(row: any) {
|
||||||
userId: row.userId,
|
userId: row.userId,
|
||||||
username: row.username,
|
username: row.username,
|
||||||
token: row.token,
|
token: row.token,
|
||||||
ip: row.ip,
|
ipRegion: row.ipRegion,
|
||||||
ipAddress: row.ipAddress,
|
ipAddress: row.ipAddress,
|
||||||
userAgent: row.userAgent,
|
userAgent: row.userAgent,
|
||||||
|
type: row.type,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
draggable: true,
|
draggable: true,
|
||||||
|
|
|
@ -7,11 +7,13 @@ export interface FormItemProps {
|
||||||
// 登录token
|
// 登录token
|
||||||
token: string;
|
token: string;
|
||||||
// 登录Ip
|
// 登录Ip
|
||||||
ip: string;
|
ipRegion: string;
|
||||||
// 登录Ip地点
|
// 登录Ip地点
|
||||||
ipAddress: string;
|
ipAddress: string;
|
||||||
// 登录时代理
|
// 登录时代理
|
||||||
userAgent: string;
|
userAgent: string;
|
||||||
|
// 操作类型
|
||||||
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加或修改表单Props
|
// 添加或修改表单Props
|
||||||
|
|
Loading…
Reference in New Issue