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(() => { - + { -