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/lexQISAgree/lexQISAgree.js | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js
index da5fd6b..375454b 100644
--- a/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js
+++ b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js
@@ -1,18 +1,17 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForQisAgreeButton';
import updateQis from '@salesforce/apex/QISReportController.updateQisForQisAgree';
-import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
-import { updateRecord } from 'lightning/uiRecordApi';
+import USER_ID from '@salesforce/user/Id';
export default class lexQISAgree extends LightningElement {
@api recordId;
IsLoading = true;
qisReportId;
OwnerId;
+ userId = USER_ID;
err;
@wire(CurrentPageReference)
@@ -38,7 +37,7 @@
this.IsLoading = false;
this.qisReportId = result.Id;
this.OwnerId = result.ownerId;
- if (this.OwnerId != UserInfo_Owner.Id) {
+ if (this.OwnerId != this.userId) {
const evt = new ShowToastEvent({
title : '鍙湁鎵�鏈夎�呭彲浠ユ寜QIS缁撴灉璺熻繘瀹屾瘯鐨勬寜閽�',
message: '',
@@ -56,11 +55,6 @@
});
}
-
- updateRecordView(recordId) {
- updateRecord({fields: { Id: recordId }});
- }
-
updateQisSubmit(){
updateQis({
recordId: this.recordId
@@ -76,7 +70,6 @@
this.dispatchEvent(evt);
}
this.dispatchEvent(new CloseActionScreenEvent());
- this.updateRecordView(this.recordId);
}).catch(error => {
console.log('error='+error);
}).finally(() => {
--
Gitblit v1.9.1