From 7429a55734e7141479c3965e822870c768fbc208 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 26 Feb 2025 09:51:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20hostId=20=E5=8F=98=E6=9B=B4=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=92=8C=E5=AD=97=E6=AE=B5=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TerminalRedis/index.vue | 2 +- src/components/TerminalSSH/index.vue | 2 +- src/components/TerminalTelnet/index.vue | 2 +- src/views/configManage/neOverview/index.vue | 4 +- src/views/monitor/job/index.vue | 36 ++++++++--------- src/views/monitor/job/log.vue | 30 +++++++------- src/views/ne/neHost/components/EditModal.vue | 14 +++---- src/views/ne/neHost/index.vue | 37 ++++++++--------- src/views/ne/neInfo/components/EditModal.vue | 8 ++-- .../neQuickSetup/components/NeInfoConfig.vue | 16 ++++---- .../ne/neQuickSetup/components/Start.vue | 2 +- .../quick-start/components/NeInfoConfig.vue | 8 ++-- .../tool/terminal/components/hostList.vue | 40 +++++++++---------- src/views/tool/terminal/index.vue | 10 ++--- 14 files changed, 103 insertions(+), 108 deletions(-) diff --git a/src/components/TerminalRedis/index.vue b/src/components/TerminalRedis/index.vue index e01081ac..0351cd60 100644 --- a/src/components/TerminalRedis/index.vue +++ b/src/components/TerminalRedis/index.vue @@ -16,7 +16,7 @@ const props = defineProps({ }, /**连接主机ID,必传 */ hostId: { - type: String, + type: Number, required: true, }, /**初始发送命令 */ diff --git a/src/components/TerminalSSH/index.vue b/src/components/TerminalSSH/index.vue index 14800a5a..e496bcb0 100644 --- a/src/components/TerminalSSH/index.vue +++ b/src/components/TerminalSSH/index.vue @@ -15,7 +15,7 @@ const props = defineProps({ }, /**连接主机ID,必传 */ hostId: { - type: String, + type: Number, required: true, }, /**窗口单行字符数 */ diff --git a/src/components/TerminalTelnet/index.vue b/src/components/TerminalTelnet/index.vue index 310e9fb1..ea42b745 100644 --- a/src/components/TerminalTelnet/index.vue +++ b/src/components/TerminalTelnet/index.vue @@ -16,7 +16,7 @@ const props = defineProps({ }, /**连接主机ID,必传 */ hostId: { - type: String, + type: Number, required: true, }, /**窗口单行字符数 */ diff --git a/src/views/configManage/neOverview/index.vue b/src/views/configManage/neOverview/index.vue index b25b934a..4eaed767 100644 --- a/src/views/configManage/neOverview/index.vue +++ b/src/views/configManage/neOverview/index.vue @@ -277,6 +277,7 @@ let dict: { }); let timer: any; +let timerFlag: boolean = false; onMounted(() => { // 初始字典数据 Promise.allSettled([getDict('ne_info_status'), getDict('index_status')]) @@ -292,7 +293,7 @@ onMounted(() => { fnLocale(); await fnGetList(false); timer = setInterval(() => { - if (!timer) return; + if (timerFlag) return; fnGetList(true); }, 10_000); // 每隔10秒执行一次 }); @@ -302,6 +303,7 @@ onMounted(() => { onBeforeUnmount(() => { clearInterval(timer); timer = null; + timerFlag = true; }); diff --git a/src/views/monitor/job/index.vue b/src/views/monitor/job/index.vue index da729e0f..1530082d 100644 --- a/src/views/monitor/job/index.vue +++ b/src/views/monitor/job/index.vue @@ -52,7 +52,7 @@ let queryParams = reactive({ /**任务组名 */ jobGroup: undefined, /**任务状态 */ - status: undefined, + statusFlag: undefined, /**当前页数 */ pageNum: 1, /**每页条数 */ @@ -64,7 +64,7 @@ function fnQueryReset() { queryParams = Object.assign(queryParams, { jobName: '', jobGroup: undefined, - status: undefined, + statusFlag: undefined, pageNum: 1, pageSize: 20, }); @@ -130,8 +130,8 @@ let tableColumns: ColumnsType = [ }, { title: t('views.monitor.job.status'), - dataIndex: 'status', - key: 'status', + dataIndex: 'statusFlag', + key: 'statusFlag', align: 'center', width: 100, }, @@ -217,7 +217,7 @@ let modalState: ModalStateType = reactive({ misfirePolicy: '3', concurrent: '0', jobGroup: 'DEFAULT', - status: '0', + statusFlag: '0', saveLog: '0', targetParams: '', remark: '', @@ -375,7 +375,7 @@ function fnModalCron(opt: boolean, cronStr?: string) { */ function fnRecordStatus(row: Record) { const text = - row.status === '1' + row.statusFlag === '1' ? dict.sysJobStatus.find(s => s.value === '1')?.label : dict.sysJobStatus.find(s => s.value === '0')?.label; Modal.confirm({ @@ -384,7 +384,7 @@ function fnRecordStatus(row: Record) { onOk() { const key = 'changeJobStatus'; message.loading({ content: t('common.loading'), key }); - changeJobStatus(row.jobId, row.status).then(res => { + changeJobStatus(row.jobId, row.statusFlag).then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ content: t('common.msgSuccess', { msg: `${row.jobName} ${text}` }), @@ -403,10 +403,10 @@ function fnRecordStatus(row: Record) { }, onCancel() { const value = - row.status === '1' + row.statusFlag === '1' ? dict.sysJobStatus.find(s => s.value === '0')?.value : dict.sysJobStatus.find(s => s.value === '1')?.value; - row.status = value || '0'; + row.statusFlag = value || '0'; }, }); } @@ -622,9 +622,9 @@ onMounted(() => { - + { -