优化登录逻辑
优化日志消息展示
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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()
|
||||
</a-form-item>
|
||||
|
||||
<!-- 验证码 -->
|
||||
<a-form-item name="code" class="form-item">
|
||||
<a-form-item name="code" class="form-item" v-if="rules.code[0].required">
|
||||
<div class="captcha-container">
|
||||
<a-input
|
||||
v-model:value="formData.code"
|
||||
|
||||
Reference in New Issue
Block a user