liangxiaozhen
2023-08-06 8d9fdd2c68656e04ea4115e994f20051b2358c90
force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js
@@ -10,7 +10,6 @@
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/buttonCampaignCtl.init';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexCreateInstructReport extends LightningElement {
    @api recordId;
@@ -52,19 +51,9 @@
    CreateInstructReport() {
        var status = this.Status;
        if (status == '公开中') {
            window.open("/apex/InstructReport?camid="+this.Id, "_top");
            window.open("/apex/InstructReport?camid=" + this.Id, "_top");
        } else {
            this.ShowToastEvent("只有批准后才能创建报告!", "error")
            // alert("只有批准后才能创建报告!");
            alert("只有批准后才能创建报告!")
        }
    }
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}