unknown
2023-07-20 5fa4c7d6c8d987891ffe5ef8fae615b33e032886
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;
@@ -18,6 +17,7 @@
    IsLoading = true;
    Id;
    Status;
    msg;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -36,7 +36,6 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.Status = result.Status;
@@ -52,18 +51,14 @@
    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")
            this.msg = '只有批准后才能创建报告!';
            this.IsLoading = false;
        }
    }
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    closeAction() {
        window.history.go(-1);
    }
}