| | |
| | | import { LightningElement } from 'lwc'; |
| | | import { LightningElement,api } from 'lwc'; |
| | | import GetTenderinformationcData from '@salesforce/apex/TenderDeleteLwcController.GetTenderinformationcData'; |
| | | import saveData from '@salesforce/apex/TenderDeleteLwcController.saveData'; |
| | | import searchTender from '@salesforce/apex/TenderDeleteLwcController.searchTender'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import tnederDeletePageCss from '@salesforce/resourceUrl/tnederDeletePageCss'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader' |
| | | export default class TenderDeletePage extends LightningElement { |
| | | @api recordid; |
| | | ParamIdStr = ''; |
| | | //页面初始化加载数据 |
| | | ScreenWidth = '' |
| | |
| | | Tenderinformationc={}; |
| | | |
| | | connectedCallback() { |
| | | Promise.all([ |
| | | loadStyle(this, tnederDeletePageCss) |
| | | ]); |
| | | console.log(this) |
| | | this.onLoadin(true); |
| | | debugger |
| | | var paramId = this.getQueryVariable('id'); |
| | | var paramId = this.recordid |
| | | if (paramId == null || paramId == '') { |
| | | return; |
| | | } |
| | |
| | | debugger |
| | | console.warn(result); |
| | | if(result=="成功"){ |
| | | alert('保存成功'); |
| | | window.location.hash = "Refresh"+"=="+this.ParamIdStr; |
| | | debugger |
| | | this.showToast('保存成功','success'); |
| | | setTimeout(() => { |
| | | window.location.href = '/'+this.recordid |
| | | // window.open('/'+this.recordid,) |
| | | },2000) |
| | | // window.location.hash = "Refresh"+"=="+this.ParamIdStr; |
| | | // debugger |
| | | this.onLoadin(false); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | if(type == "success"){ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode:"sticky" |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |
| | | // 2022-03-31 更换了控件类型 end |
| | | } |