😎1、增加作业触发器运行日志清空 2、增加强制修改密码框退出
This commit is contained in:
parent
cd66255bd2
commit
13876cd372
@ -356,4 +356,15 @@ public class SysJobService : IDynamicApiController, ITransient
|
||||
.OrderByDescending(u => u.Id)
|
||||
.ToPagedListAsync(input.Page, input.PageSize);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清空作业触发器运行记录 🔖
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "ClearJobTriggerRecord"), HttpPost]
|
||||
[DisplayName("清空作业触发器运行记录")]
|
||||
public void ClearJobTriggerRecord()
|
||||
{
|
||||
_sysJobTriggerRecordRep.AsSugarClient().DbMaintenance.TruncateTable<SysJobTriggerRecord>();
|
||||
}
|
||||
}
|
||||
@ -225,6 +225,49 @@ export const SysJobApiAxiosParamCreator = function (configuration?: Configuratio
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 清空作业触发器运行记录 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysJobClearJobTriggerRecordPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysJob/clearJobTriggerRecord`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除作业 ⏰
|
||||
@ -1080,6 +1123,19 @@ export const SysJobApiFp = function(configuration?: Configuration) {
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 清空作业触发器运行记录 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysJobClearJobTriggerRecordPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).apiSysJobClearJobTriggerRecordPost(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除作业 ⏰
|
||||
@ -1361,6 +1417,15 @@ export const SysJobApiFactory = function (configuration?: Configuration, basePat
|
||||
async apiSysJobCancelSleepPost(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysJobApiFp(configuration).apiSysJobCancelSleepPost(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 清空作业触发器运行记录 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysJobClearJobTriggerRecordPost(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysJobApiFp(configuration).apiSysJobClearJobTriggerRecordPost(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除作业 ⏰
|
||||
@ -1579,6 +1644,16 @@ export class SysJobApi extends BaseAPI {
|
||||
public async apiSysJobCancelSleepPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysJobApiFp(this.configuration).apiSysJobCancelSleepPost(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 清空作业触发器运行记录 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysJobApi
|
||||
*/
|
||||
public async apiSysJobClearJobTriggerRecordPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysJobApiFp(this.configuration).apiSysJobClearJobTriggerRecordPost(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 删除作业 ⏰
|
||||
|
||||
@ -86,6 +86,14 @@ export interface AddNoticeInput {
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddNoticeInput
|
||||
*/
|
||||
tenantId?: number | null;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*
|
||||
|
||||
@ -76,7 +76,7 @@ export interface SysJobTriggerRecord {
|
||||
status?: TriggerStatus;
|
||||
|
||||
/**
|
||||
* 本次执行结果
|
||||
* 执行结果
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysJobTriggerRecord
|
||||
@ -84,7 +84,7 @@ export interface SysJobTriggerRecord {
|
||||
result?: string | null;
|
||||
|
||||
/**
|
||||
* 本次执行耗时
|
||||
* 执行耗时
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysJobTriggerRecord
|
||||
|
||||
@ -86,6 +86,14 @@ export interface SysNotice {
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysNotice
|
||||
*/
|
||||
tenantId?: number | null;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*
|
||||
|
||||
@ -86,6 +86,14 @@ export interface UpdateNoticeInput {
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateNoticeInput
|
||||
*/
|
||||
tenantId?: number | null;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
<el-dropdown-item :icon="Avatar" command="/system/userCenter">{{ $t('message.user.dropdown2') }}</el-dropdown-item>
|
||||
<el-dropdown-item :icon="Loading" command="clearCache">{{ $t('message.user.dropdown3') }}</el-dropdown-item>
|
||||
<el-dropdown-item :icon="Lock" divided command="lockScreen">{{ $t('message.layout.threeIsLockScreen') }}</el-dropdown-item>
|
||||
<el-dropdown-item :icon="CircleCloseFilled" divided command="logOut">{{ $t('message.user.dropdown5') }}</el-dropdown-item>
|
||||
<el-dropdown-item :icon="CircleCloseFilled" divided command="logut">{{ $t('message.user.dropdown5') }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
|
||||
@ -216,7 +216,9 @@
|
||||
</template>
|
||||
<el-card class="full-table" shadow="hover">
|
||||
<vxe-grid ref="xGridRecord" class="xGrid-style" v-bind="optionsRecord" v-on="gridEventsRecord">
|
||||
<template #toolbar_buttons></template>
|
||||
<template #toolbar_buttons>
|
||||
<el-button icon="ele-DeleteFilled" type="danger" @click="handleClearJobTriggerRecord"> 清空 </el-button>
|
||||
</template>
|
||||
<template #toolbar_tools> </template>
|
||||
<template #empty>
|
||||
<el-empty :image-size="200" />
|
||||
@ -569,13 +571,13 @@ const optionsRecord = useVxeTable<SysJobTriggerRecord>(
|
||||
}
|
||||
);
|
||||
|
||||
// 查询api
|
||||
// 查询api-作业触发器运行记录
|
||||
const handleQueryRecordApi = async (page: VxeGridPropTypes.ProxyAjaxQueryPageParams, sort: VxeGridPropTypes.ProxyAjaxQuerySortCheckedParams) => {
|
||||
const params = Object.assign(state.recordPageParam, { page: page.currentPage, pageSize: page.pageSize, field: sort.field, order: sort.order, descStr: 'desc' }) as PageJobTriggerRecordInput;
|
||||
return getAPI(SysJobApi).apiSysJobPageJobTriggerRecordPost(params);
|
||||
};
|
||||
|
||||
// 查询操作
|
||||
// 查询操作-作业触发器运行记录
|
||||
const handleQueryRecord = async () => {
|
||||
await xGridRecord.value?.commitProxy('query');
|
||||
};
|
||||
@ -591,6 +593,23 @@ const gridEventsRecord: VxeGridListeners<SysJobTriggerRecord> = {
|
||||
state.recordPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
},
|
||||
};
|
||||
|
||||
// 清空作业触发器运行记录
|
||||
const handleClearJobTriggerRecord = async () => {
|
||||
ElMessageBox.confirm(`确定要清空日志?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
optionsRecord.loading = true;
|
||||
await getAPI(SysJobApi).apiSysJobClearJobTriggerRecordPost();
|
||||
optionsRecord.loading = false;
|
||||
ElMessage.success('清空成功');
|
||||
await handleQueryRecord();
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@ -118,7 +118,7 @@
|
||||
|
||||
<script lang="ts" setup name="sysLogEx">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { useDateTimeShortCust } from '/@/hooks/dateTimeShortCust';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
@ -252,11 +252,19 @@ const gridEvents: VxeGridListeners<SysLogEx> = {
|
||||
|
||||
// 清空日志
|
||||
const handleClear = async () => {
|
||||
ElMessageBox.confirm(`确定要清空日志?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
options.loading = true;
|
||||
await getAPI(SysLogExApi).apiSysLogExClearPost();
|
||||
options.loading = false;
|
||||
ElMessage.success('清空成功');
|
||||
await handleQuery();
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
// 查看详情
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
|
||||
<script lang="ts" setup name="sysLogMsg">
|
||||
import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { useDateTimeShortCust } from '/@/hooks/dateTimeShortCust';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
@ -292,11 +292,19 @@ const gridEvents: VxeGridListeners<SysLogMsg> = {
|
||||
|
||||
// 清空日志
|
||||
const handleClear = async () => {
|
||||
ElMessageBox.confirm(`确定要清空日志?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
options.loading = true;
|
||||
await getAPI(SysLogMsgApi).apiSysLogMsgClearPost();
|
||||
options.loading = false;
|
||||
ElMessage.success('清空成功');
|
||||
await handleQuery();
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
// 查看详情
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
|
||||
<script lang="ts" setup name="sysLogOp">
|
||||
import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { useDateTimeShortCust } from '/@/hooks/dateTimeShortCust';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
@ -335,11 +335,19 @@ const gridEvents: VxeGridListeners<SysLogOp> = {
|
||||
|
||||
// 清空日志
|
||||
const handleClear = async () => {
|
||||
ElMessageBox.confirm(`确定要清空日志?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
options.loading = true;
|
||||
await getAPI(SysLogOpApi).apiSysLogOpClearPost();
|
||||
options.loading = false;
|
||||
ElMessage.success('清空成功');
|
||||
await handleQuery();
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
// 查看详情
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
|
||||
<script lang="ts" setup name="sysLogVis">
|
||||
import { onMounted, reactive, ref, defineAsyncComponent } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { useDateTimeShortCust } from '/@/hooks/dateTimeShortCust';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
@ -285,11 +285,19 @@ const gridEvents: VxeGridListeners<SysLogVis> = {
|
||||
|
||||
// 清空日志
|
||||
const handleClear = async () => {
|
||||
ElMessageBox.confirm(`确定要清空日志?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
options.loading = true;
|
||||
await getAPI(SysLogVisApi).apiSysLogVisClearPost();
|
||||
options.loading = false;
|
||||
ElMessage.success('清空成功');
|
||||
await handleQuery();
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
// 打开访问热力图
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<!-- <el-button @click="cancel">取 消</el-button> -->
|
||||
<el-button type="danger" plain @click="logout">退 出</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
@ -94,6 +94,11 @@ const validatePassword = (_rule: any, value: any, callback: any) => {
|
||||
}
|
||||
};
|
||||
|
||||
// 退出
|
||||
const logout = () => {
|
||||
clearAccessTokens();
|
||||
};
|
||||
|
||||
// 导出对象
|
||||
defineExpose({ openDialog });
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user