19626
2023-04-04 44224f92bc02b73db5069cf649daeb103561eb78
update button 4.4
23个文件已添加
657 ■■■■■ 已修改文件
force-app/main/default/lwc/lexCancel/lexCancel.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancel/lexCancel.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancel/lexCancel.js 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancel/lexCancel.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.html 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancel/lexCancel.css
New file
@@ -0,0 +1,10 @@
.cancelHolder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display: none !important;
}
force-app/main/default/lwc/lexCancel/lexCancel.html
New file
@@ -0,0 +1,6 @@
<template>
    <div class="cancelHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexCancel/lexCancel.js
New file
@@ -0,0 +1,95 @@
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/ReportController.initForCancelButton';
import updateForCancelButton  from '@salesforce/apex/ReportController.updateForCancelButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexCancel extends LightningElement {
    @api recordId;
    status;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.status = result.status;
                console.log(this.status);
                this.cancel();
            }
        }).catch(error => {
            console.log("error");
            console.log(error);
        }).finally(() => {
        });
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
    cancel () {
        if (this.status == "取消") {
            ShowToastEvent("已经取消!","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
            }
        if (this.status == "批准") {
            ShowToastEvent("已经批准,不能删除!","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if (this.status == "完毕") {
            ShowToastEvent("已经完毕,不能删除!","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if (this.status == "提交") {
            ShowToastEvent("已经提交,不能删除!","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        updateForCancelButton({
            recordId: this.recordId
        }).then(result =>{
            this.showToast("取消成功!","success");
            this.updateRecordView(this.recordId);
            this.dispatchEvent(new CloseActionScreenEvent());
        });
    }
}
force-app/main/default/lwc/lexCancel/lexCancel.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">
    <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>
force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.css
New file
@@ -0,0 +1,10 @@
.dispatchOCSMQARAHolder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display: none !important;
}
force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.html
New file
@@ -0,0 +1,6 @@
<template>
    <div class="dispatchOCSMQARAHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js
New file
@@ -0,0 +1,59 @@
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import updateForDispatchOCSMQARAButton  from '@salesforce/apex/ReportController.updateForDispatchOCSMQARAButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexDispatchOCSMQARA extends LightningElement {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        console.log(this.recordId);
        this.IsLoading = false;
        this.DispatchOCSMQARA();
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
    DispatchOCSMQARA () {
            updateForDispatchOCSMQARAButton({
                recordId: this.recordId
            }).then(result =>{
                this.showToast("成功","success");
                this.updateRecordView(this.recordId);
                this.dispatchEvent(new CloseActionScreenEvent());
                });
    }
}
force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.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">
    <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>
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.html
New file
@@ -0,0 +1,6 @@
<template>
    <div class="reportHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
New file
@@ -0,0 +1,82 @@
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/ReportController.initForOCSMNoToReportButton';
import updateForOCSMNoToReportButton  from '@salesforce/apex/ReportController.updateForOCSMNoToReportButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexOCSMNoToReportForReport extends LightningElement {
    @api recordId;
    IsLoading = true;
    OCSMAdministrativeReportNumber;
    OCSMAdministrativeReportDate;
    AwareDate;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result=>{
            this.OCSMAdministrativeReportDate = result.OCSMAdministrativeReportDate;
            this.OCSMAdministrativeReportNumber = result.OCSMAdministrativeReportNumber;
            this.AwareDate = result.awareDate;
            this.noToReport();
        });
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
    noToReport(){
        if (!confirm("不要报告后无法撤回,是否继续?")) {
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if(this.OCSMAdministrativeReportNumber != undefined || this.OCSMAdministrativeReportDate != undefined ){
            this.showToast("已经报告的QIS,不可以点击OCSM不要报告。","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if(this.AwareDate != undefined ){
           updateForOCSMNoToReportButton({
                recordId: this.recordId
           }).then(result=>{
                this.showToast("OCSM不要报告成功","success");
                this.updateRecordView(this.recordId);
                this.dispatchEvent(new CloseActionScreenEvent());
           });
        }else{
            this.showToast("没有AwareDate或已经OCSM行政报告,请确认。","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
    }
}
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.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">
    <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>
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.css
New file
@@ -0,0 +1,10 @@
.toReportHolder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display: none !important;
}
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.html
New file
@@ -0,0 +1,6 @@
<template>
    <div class="toReportHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
New file
@@ -0,0 +1,88 @@
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/ReportController.initForOCSMToReportButton';
import updateForOCSMToReportButton  from '@salesforce/apex/ReportController.updateForOCSMToReportButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexOCSMToReport extends LightningElement {
    @api recordId;
    IsLoading = true;
    OCSMAdministrativeReportStatus;
    awareDate;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.OCSMAdministrativeReportStatus = result.OCSMAdministrativeReportStatus;
                this.awareDate = result.awareDate;
                this.toReport();
            }
        }).catch(error => {
            console.log("error");
            console.log(error);
        }).finally(() => {
        });
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
    toReport () {
        if (!confirm("报告后无法撤回,是否继续?")) {
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
            }
        if(this.OCSMAdministrativeReportStatus == undefined && this.awareDate != undefined ){
            updateForOCSMToReportButton({
                recordId: this.recordId
            }).then(result =>{
                this.showToast("成功","success");
                this.updateRecordView(this.recordId);
                this.dispatchEvent(new CloseActionScreenEvent());
                });
        }else{
            this.showToast("没有AwareDate或已经OCSM行政报告,请确认。","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
    }
}
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.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">
    <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>
force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.css
New file
@@ -0,0 +1,10 @@
.sisToOPDHolder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display: none !important;
}
force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.html
New file
@@ -0,0 +1,6 @@
<template>
    <div class="sisToOPDHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js
New file
@@ -0,0 +1,96 @@
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import updateForSIStoOPDButton  from '@salesforce/apex/ReportController.updateForSIStoOPDButton';
import init  from '@salesforce/apex/ReportController.initForSIStoOPDButton';
import { updateRecord } from 'lightning/uiRecordApi';
import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexSIStoOPD extends LightningElement {
    @api recordId;
    IsLoading = true;
    ownerId;
    status;
    userId;
    recordTypeId = '01210000000Qekj';
    errorMsg;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.ownerId = result.ownerId;
                this.status = result.status;
                this.userId = result.userId;
                this.SIStoOPD();
            }
        }).catch(error => {
            console.log("error");
            console.log(error);
        }).finally(() => {
            console.log(this.errorMsg);
            if(this.errorMsg){
                this.showToast(this.errorMsg,"error");
            }
        });
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
    SIStoOPD () {
        if(this.ownerId == this.userId && this.status == "草案中") {
            updateForSIStoOPDButton({
                recordId: this.recordId,
                recordTypeId: this.recordTypeId
            }).then(result=>{
                if(result){
                    this.showToast(result,"error");
                }else{
                    this.updateRecordView(this.recordId);
                }
                this.dispatchEvent(new CloseActionScreenEvent());
            });
    }
}
        // ifError(result){
        //     console.log(result);
        //     if(result){
        //         this.showToast(result,"error");
        //     }
        // }
}
force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.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">
     <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>
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.css
New file
@@ -0,0 +1,10 @@
.answerHolder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display: none !important;
}
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.html
New file
@@ -0,0 +1,7 @@
<template>
    <div class="answerHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js
New file
@@ -0,0 +1,84 @@
import { LightningElement, wire, track, api } from "lwc";
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from "lightning/actions";
import { NavigationMixin } from "lightning/navigation";
import init from "@salesforce/apex/ReportController.initForVOCAnswerButton";
import updateForVOCAnswerButton from "@salesforce/apex/ReportController.updateForVOCAnswerButton";
import { updateRecord } from "lightning/uiRecordApi";
import { ShowToastEvent } from "lightning/platformShowToastEvent";
export default class LexVOCAnswer extends LightningElement {
  @api recordId;
  status;
  Isloading = true;
  @wire(CurrentPageReference)
  getStateParameters(currentPageReference) {
    console.log(111);
    console.log(currentPageReference);
    if (currentPageReference) {
      const urlValue = currentPageReference.state.recordId;
      if (urlValue) {
        let str = `${urlValue}`;
        console.log("str");
        console.log(str);
        this.recordId = str;
      }
    }
  }
  connectedCallback() {
    console.log(this.recordId);
    init({
      recordId: this.recordId,
    })
      .then((result) => {
        console.log(result);
        if (result != null) {
          this.Isloading = false;
          this.status = result.status;
          this.update();
        }
      })
      .catch((error) => {
        console.log("error");
        console.log(error);
      })
      .finally(() => {});
    //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
  }
  showToast(msg, type) {
    const event = new ShowToastEvent({
      title: "",
      message: msg,
      variant: type
    });
    this.dispatchEvent(event);
  }
  updateRecordView(recordId) {
    updateRecord({ fields: { Id: recordId } });
  }
  update() {
    if (this.status != "已分配") {
      this.showToast("不是已分配不能点击", "error");
      return;
    }
    updateForVOCAnswerButton({
      recordId: this.recordId
    }).then(result => {
      if (result == null) {
        this.showToast("成功", "success");
      } else {
        console.log(result);
        this.showToast(result,"error");
      }
      this.updateRecordView(this.recordId);
      this.dispatchEvent(new CloseActionScreenEvent());
    }).catch(error=>{
      console.log(error);
    });
  }
}
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.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">
    <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>