mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-08 12:57:11 +08:00
fix: 日志在小屏显示问题
This commit is contained in:
@@ -71,7 +71,7 @@ export interface JobInstanceQuery {
|
||||
export interface JobInstanceLogResp {
|
||||
id: number
|
||||
message: any[]
|
||||
isFinished: number
|
||||
finished: number
|
||||
fromIndex: number
|
||||
nextStartId: number
|
||||
}
|
||||
|
@@ -1,22 +1,5 @@
|
||||
/* 全局样式 */
|
||||
@import './var.scss';
|
||||
// 全局滚动条
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: var(--color-bg-3);
|
||||
border-radius: 5px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: var(--color-bg-3);
|
||||
border-radius: 5px;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width:8px;
|
||||
height: 5px;
|
||||
}
|
||||
::-webkit-scrollbar-track-piece {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border-radius: 0;
|
||||
}
|
||||
// 通用外边距
|
||||
.gi_margin {
|
||||
margin: $margin;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-modal v-model:visible="visible" title="任务日志详情" :width="width >= 1500 ? 1500 : '100%'" :footer="false"
|
||||
@close="closed">
|
||||
<div style="display: flex; min-height: 600px;max-height: 800px;">
|
||||
<a-modal v-model:visible="visible" title="任务日志详情" :bodyStyle="{ maxHeight: '80vh', overflow: 'auto' }"
|
||||
:width="width >= 1500 ? 1500 : '100%'" :footer="false" @close="closed">
|
||||
<div style="display: flex;">
|
||||
<div style="padding: 10px 10px;">
|
||||
<div class="job_list">
|
||||
<div :class="`job_list_item ${item.id === activeId ? 'active' : ''}`" v-for="item in dataList" :key="item.id"
|
||||
@@ -92,16 +92,25 @@ const onDetail = (record: JobLogResp) => {
|
||||
// 日志输出
|
||||
const onLogDetail = async (record: JobInstanceResp) => {
|
||||
activeId.value = record?.id
|
||||
// todo startId根据第一次查询 如果有返回!=0则需要在查一次
|
||||
const res = await listJobInstanceLog({
|
||||
taskBatchId: record.taskBatchId,
|
||||
jobId: record.jobId,
|
||||
taskId: record.id,
|
||||
startId: 0,
|
||||
fromIndex: 0,
|
||||
size: 50
|
||||
})
|
||||
content.value = res.data.message.map(formatLog).join('\n')
|
||||
try {
|
||||
// todo startId根据第一次查询 如果有返回!=0则需要在查一次
|
||||
const res = await listJobInstanceLog({
|
||||
taskBatchId: record.taskBatchId,
|
||||
jobId: record.jobId,
|
||||
taskId: record.id,
|
||||
startId: 0,
|
||||
fromIndex: 0,
|
||||
size: 50
|
||||
})
|
||||
if (res.data?.finished) {
|
||||
clearInterval(setIntervalNode.value)
|
||||
}
|
||||
content.value = res.data.message.map(formatLog).join('\n')
|
||||
} catch (error) {
|
||||
content.value = ''
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
const onStartInfo = (record: JobInstanceResp) => {
|
||||
content.value = ''
|
||||
|
Reference in New Issue
Block a user