From 7986d6aaf7e235f2f5a7dac7345f97a76ac00b97 Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期五, 26 五月 2023 12:23:09 +0800
Subject: [PATCH] 清理多余引用,去除多余update操作(跳转带默认值未完成)
---
force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js | 36 ++++++++++++++++--------------------
1 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js b/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
index 814dd7b..2f48924 100644
--- a/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
+++ b/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
@@ -1,12 +1,10 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
+import LightningConfirm from 'lightning/confirm';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForOCMSubmitButton';
import updateQis from '@salesforce/apex/QISReportController.updateQisWithOCM';
-import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
-import { updateRecord } from 'lightning/uiRecordApi';
export default class lexOCMSubmit extends LightningElement {
@api recordId;
@@ -86,29 +84,27 @@
this.dispatchEvent(new CloseActionScreenEvent());
return;
}
-
- if (!confirm("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
- this.updateQisSubmit();
- if (this.isaohuiproduct == 'true') {
- this.dispatchEvent(new CloseActionScreenEvent());
- this.updateRecordView(this.recordId);
- }
- this.dispatchEvent(new CloseActionScreenEvent());
- this.updateRecordView(this.recordId);
+ LightningConfirm.open({
+ message: '涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵',
+ variant: 'headerless',
+ label: 'this is the aria-label value',
+ }).then(res=>{
+ if(res) {
+ this.updateQisSubmit();
+ if (this.isaohuiproduct) {
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }else{
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
+ });
}).catch(error => {
console.log('error='+error);
}).finally(() => {
});
}
-
- updateRecordView(recordId) {
- updateRecord({fields: { Id: recordId }});
- }
-
updateQisSubmit(){
updateQis({
recordId: this.recordId
--
Gitblit v1.9.1