Browse Source

REPORT-116621 fix: 【服务拆分】数据连接消息结构适配

research/11.0
Austin.Duan 8 months ago
parent
commit
70a96925b7
  1. 12
      src/modules/crud/decision.api.ts

12
src/modules/crud/decision.api.ts

@ -66,9 +66,11 @@ export class DecisionApi implements Api {
return new Promise((resolve, rejected) => {
this.addEventListener(editStatusEvent.OPEN, res => {
if (res.errorCode) {
const data = JSON.parse(res.data);
if (data.errorCode) {
let errorMessage = '';
switch (res.errorCode) {
switch (data.errorCode) {
case errorCode.CONNECTION_DELETED:
errorMessage = 'Dec-Dcm_Connection_Deleted';
break;
@ -76,13 +78,13 @@ export class DecisionApi implements Api {
errorMessage = 'Dec-Dcm_Connection_Is_Using';
break;
default:
errorMessage = res.errorMsg;
errorMessage = data.errorMessage;
break;
}
BI.Msg.toast(BI.i18nText(errorMessage, res.errorMsg), {
BI.Msg.toast(BI.i18nText(errorMessage, data.errorMessage), {
level: 'error',
});
rejected(res);
rejected(data);
} else {
resolve(res);
}

Loading…
Cancel
Save