diff --git a/src/views/index.vue b/src/views/index.vue index 128c625..a77fb73 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -140,12 +140,12 @@ const handlePackagePass = () => { // SSE事件处理函数 const handleL1Event = (data: any) => { // L1_EVENT放到自动包装日志区 - addPackageLog(`L1事件: ${JSON.stringify(data)}`); + addPackageLog(`【L1 事件】 ${data.message}`); }; const handleL4Event = (data: any) => { // L4_EVENT放到检测设备日志区 - addDetectionLog(`L4事件: ${JSON.stringify(data)}`); + addDetectionLog(`【L4 事件】 ${data.message}`); if(data.code === 201) { detectForm.confirmSequence = data.data } @@ -153,7 +153,7 @@ const handleL4Event = (data: any) => { const handleMESEvent = (data: any) => { // MES_EVENT放到检测设备日志区 - addDetectionLog(`MES事件: ${JSON.stringify(data)}`); + addDetectionLog(`【MES 事件】 ${data.message}`); }; const handleSseMessage = (data: string) => { diff --git a/src/views/login.vue b/src/views/login.vue index f668a2d..97fbed5 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -42,6 +42,9 @@ const refreshCaptcha = async () => { await getCaptcha().then((res: any) => { if (res.captchaOnOff) { captchaImg.value = "data:image/gif;base64," + res.img + rules.code[0].required = true; + } else { + rules.code[0].required = false; } formData.uuid = res.uuid formData.code = '' // 清空验证码输入 @@ -136,7 +139,7 @@ refreshCaptcha() - +