From e14d6d0619330cad423f06493e3aa2371faa2a8f Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期六, 09 九月 2023 14:02:23 +0800
Subject: [PATCH] Sit期间修改
---
force-app/main/default/lwc/lexCancel/lexCancel.js | 34 ++++++++++++++++++++++------------
1 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/force-app/main/default/lwc/lexCancel/lexCancel.js b/force-app/main/default/lwc/lexCancel/lexCancel.js
index 302de36..be3a1c5 100644
--- a/force-app/main/default/lwc/lexCancel/lexCancel.js
+++ b/force-app/main/default/lwc/lexCancel/lexCancel.js
@@ -1,3 +1,11 @@
+/*
+ * @Description:
+ * @version:
+ * @Author: chen jing wu
+ * @Date: 2023-03-27 13:47:21
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-08-25 16:41:19
+ */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -37,23 +45,20 @@
this.status = result.status;
console.log(this.status);
this.cancel();
- this.IsLoading = false;
-
}
}).catch(error => {
console.log("error");
console.log(error);
- }).finally(() => {
-
});
}
showToast(msg,type) {
const event = new ShowToastEvent({
- title: '',
+ title: ' ',
message: msg,
- variant: type
+ variant: type,
+ mode: 'sticky'
});
this.dispatchEvent(event);
}
@@ -65,30 +70,35 @@
cancel () {
if (this.status == "鍙栨秷") {
- ShowToastEvent("宸茬粡鍙栨秷锛�","error");
+ this.showToast("宸茬粡鍙栨秷锛�","error");
this.dispatchEvent(new CloseActionScreenEvent());
return;
}
if (this.status == "鎵瑰噯") {
- ShowToastEvent("宸茬粡鎵瑰噯锛屼笉鑳藉垹闄わ紒","error");
+ this.showToast("宸茬粡鎵瑰噯锛屼笉鑳藉垹闄わ紒","error");
this.dispatchEvent(new CloseActionScreenEvent());
return;
}
if (this.status == "瀹屾瘯") {
- ShowToastEvent("宸茬粡瀹屾瘯锛屼笉鑳藉垹闄わ紒","error");
+ this.showToast("宸茬粡瀹屾瘯锛屼笉鑳藉垹闄わ紒","error");
this.dispatchEvent(new CloseActionScreenEvent());
return;
}
if (this.status == "鎻愪氦") {
- ShowToastEvent("宸茬粡鎻愪氦锛屼笉鑳藉垹闄わ紒","error");
+ this.showToast("宸茬粡鎻愪氦锛屼笉鑳藉垹闄わ紒","error");
this.dispatchEvent(new CloseActionScreenEvent());
return;
}
updateForCancelButton({
recordId: this.recordId
}).then(result =>{
- this.showToast("鍙栨秷鎴愬姛锛�","success");
- this.updateRecordView(this.recordId);
+ if(result){
+ this.showToast(result,"error");
+ }else{
+ this.showToast("鍙栨秷鎴愬姛锛�","success");
+ this.updateRecordView(this.recordId);
+ }
+ this.IsLoading = false;
this.dispatchEvent(new CloseActionScreenEvent());
});
}
--
Gitblit v1.9.1