From 428f42fab44b654c69fbc461513203830743d7de Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期二, 18 七月 2023 10:55:50 +0800
Subject: [PATCH] hql20230718更新lightning按钮
---
force-app/main/default/lwc/lexSendQIS/lexSendQIS.js | 54 ++++++++++++++++++++++++++++++------------------------
1 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js b/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js
index 359f78a..63636f4 100644
--- a/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js
+++ b/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js
@@ -4,9 +4,15 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForlexSendQISButton';
import sendSPO from '@salesforce/apex/QISReportController.updateQisForSendQIS';
-
+/*
+ * @Description: 鍙戦�丵IS鍒癝PO
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexSendQIS extends LightningElement {
- @api recordId;
+ @api recordId;
str;
err;
IsLoading = true;
@@ -39,9 +45,9 @@
this.ProfileName = result.profileName;
this.IsSendQIS = result.isSendQIS;
if (this.qisRecordName == '2.OCSM') {
- const evt = new ShowToastEvent({
- title : '涓嶈兘鎻愪氦鍒癝PO',
- message: '璁板綍绫诲瀷涓�'+this.qisRecordName,
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '涓嶈兘鎻愪氦鍒癝PO璁板綍绫诲瀷涓�'+this.qisRecordName,
variant: 'error'
});
this.dispatchEvent(evt);
@@ -50,9 +56,9 @@
}
if (!(this.ProfileName == '绯荤粺绠$悊鍛�' || this.ProfileName == '2F4_鎶�鏈帹杩涢儴' || this.ProfileName == '2F1_鏈嶅姟绐楀彛')) {
- const evt = new ShowToastEvent({
- title : '娌℃湁鏉冮檺鎻愪氦锛岃鑱旂郴绯荤粺绠$悊鍛�',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '娌℃湁鏉冮檺鎻愪氦锛岃鑱旂郴绯荤粺绠$悊鍛�',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -61,9 +67,9 @@
}
if (this.IsSendQIS) {
- const evt = new ShowToastEvent({
- title : '宸叉彁浜ゅ埌SPO锛岃涓嶈閲嶅鎻愪氦',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '宸叉彁浜ゅ埌SPO锛岃涓嶈閲嶅鎻愪氦',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -78,32 +84,32 @@
});
}
send2SPO(){
- sendSPO({
- recordId: this.recordId
- }).then(result =>{
- console.log('result'+result);
+ sendSPO({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
this.err = result;
- if (result!='鎴愬姛') {
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
}else{
- const evt = new ShowToastEvent({
- title : '鎻愪氦鎴愬姛锛佽鍦⊿PO绯荤粺涓畬鎴愰��鎹㈣揣鐢宠',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '鎻愪氦鎴愬姛锛佽鍦⊿PO绯荤粺涓畬鎴愰��鎹㈣揣鐢宠',
variant: 'success'
});
- this.dispatchEvent(evt);
- this.dispatchEvent(new CloseActionScreenEvent());
+ this.dispatchEvent(evt);
+ this.dispatchEvent(new CloseActionScreenEvent());
window.location.replace("https://olympus.sharepoint.cn/sites/GSPWF/SitePages/HomePage.aspx");
}
- }).catch(error => {
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
--
Gitblit v1.9.1