123
chenjingwu
2024-04-19 5c79ed09628411b95f443ece77e63277e9752172
force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-09-11 09:20:29
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-26 09:32:55
 * @LastEditTime: 2023-10-10 17:47:00
 */
import { api, wire,LightningElement, track } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -41,13 +41,22 @@
        }
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: ' ',
            message: msg,
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
        if(type == 'success'){
            const event = new ShowToastEvent({
                message: msg,
                variant: type,
            });
            this.dispatchEvent(event);
            this.dispatchEvent(new CloseActionScreenEvent());
        }else{
            const event = new ShowToastEvent({
                message: msg,
                variant: type,
                mode: 'sticky'
            });
            this.dispatchEvent(event);
            this.dispatchEvent(new CloseActionScreenEvent());
        }
    }