unknown
2023-05-04 49a9ae5ad6999c280e4a010a7b2d6161fa860a20
同行报告书-按钮

同行报告书-取消
4个文件已添加
89 ■■■■■ 已修改文件
force-app/main/default/lwc/lexVisitReportCancel/lexVisitReportCancel.css 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVisitReportCancel/lexVisitReportCancel.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVisitReportCancel/lexVisitReportCancel.js 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVisitReportCancel/lexVisitReportCancel.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVisitReportCancel/lexVisitReportCancel.css
New file
@@ -0,0 +1,22 @@
.outerBorderCss{
    border: 1px solid #D4D4D4;
    border-radius : 5px;
    border-top : 3px solid #565959;
}
.borderCss{
    border: 1px solid #D4D4D4;
    border-radius : 5px;
    margin-bottom : 7px;
    border-top : 3px solid #565959;
}
.headerDorderCss{
    border-top: 1px solid #565959;
    border-bottom: 1px solid #D4D4D4;
    padding:3px;
}
.centerCss{
    text-align: center;
}
.centerCss .left{
    margin-left: 100px;
}/* sample css file */
force-app/main/default/lwc/lexVisitReportCancel/lexVisitReportCancel.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="sisToOPDHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexVisitReportCancel/lexVisitReportCancel.js
New file
@@ -0,0 +1,51 @@
import { LightningElement, track, wire, api } from 'lwc';
import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/lexVisitReportCancelController.init';
export default class lexVisitReportCancel extends LightningElement {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
        console.log(currentPageReference,'666666666666');
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str:"+str);
             this.recordId = str;
           }
         }
     }
    connectedCallback(){
        init({
            recordId:this.recordId
        }).then(res=>{
            if(res == '取消成功'){
                this.showToast('取消成功','success');
            }else{
                this.showToast(res,'warning');
            }
        })
    }
    updateRecordView() {
        updateRecord({fields: { Id: this.recordId }});
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        if(type == 'success'){
            this.updateRecordView();
        }
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexVisitReportCancel/lexVisitReportCancel.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOCMSubmit">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>