Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(frontend): 表更 SQL执行单据查看详情时页面卡死 #3730
Browse files Browse the repository at this point in the history
hLinx authored and zhangzhw8 committed Mar 28, 2024
1 parent e52fd8a commit c6a2d81
Showing 2 changed files with 19 additions and 19 deletions.
37 changes: 18 additions & 19 deletions dbm-ui/frontend/src/views/tickets/common/hooks/logCounts.ts
Original file line number Diff line number Diff line change
@@ -82,25 +82,24 @@ export default function () {
});
};

watch(
() => wholeLogList,
() => {
const successLogs: any[] = [];
const failLogs: any[] = [];
wholeLogList.value.forEach((item) => {
if (item.message.match(fileStartReg)) {
successLogs.push(item);
}
if (item.message.match(fileEndReg)) {
failLogs.push(item);
}
});
const diffCounts = successLogs.length - failLogs.length;
counts.success = successLogs.length - diffCounts;
counts.fail = diffCounts === 0 ? 0 : diffCounts;
},
{ immediate: true, deep: true },
);
watch(() => wholeLogList, () => {
const successLogs: any[] = [];
const failLogs: any[] = [];
wholeLogList.value.forEach((item) => {
const message = item.message.slice(0, 300);
if (message.match(fileStartReg)) {
successLogs.push(item);
}
if (message.match(fileEndReg)) {
failLogs.push(item);
}
});
const diffCounts = successLogs.length - failLogs.length;
counts.success = successLogs.length - diffCounts;
counts.fail = diffCounts === 0 ? 0 : diffCounts;
}, {
immediate: true, deep: true });


onBeforeUnmount(() => {
clearTimeout(logTimer);
1 change: 1 addition & 0 deletions dbm-ui/frontend/vite.config.mts
Original file line number Diff line number Diff line change
@@ -112,6 +112,7 @@ export default defineConfig(({ mode }) => {
exclude: ['@blueking/ip-selector/dist/vue3.x.js', 'lib/'],
},
server: {
strictPort: true,
host: '127.0.0.1',
port: 8088,
},

0 comments on commit c6a2d81

Please sign in to comment.