Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then((pcanvas) => {
pcanvas.toBlob((blob) => {
FileSaver.saveAs(blob, '用户故事地图.png');
});
shareContent.style.width = shareContentWidth;
shareContent.style.height = shareContentHeight;
message.success('导出图片成功', undefined, undefined, 'top');
})
.catch((error) => {
const { name, des, default: isDefault } = data;
const { editingPriority: { id, objectVersionNumber } } = PriorityStore;
const { priorityColor } = this.state;
const orgId = AppState.currentMenuType.organizationId;
try {
await PriorityStore.editPriorityById(orgId, {
id,
name,
description: des,
default: !!isDefault,
objectVersionNumber,
colour: priorityColor,
organizationId: orgId,
});
message.success('修改成功');
PriorityStore.loadPriorityList(orgId);
this.hideSidebar();
} catch (e) {
message.error('修改失败');
this.setState({
loading: false,
});
}
} else {
this.setState({
loading: false,
});
}
});
};
.then((data) => {
if (data) {
message.success(intl.formatMessage({ id: 'deleteSuccess' }));
} else {
message.error(intl.formatMessage({ id: 'deleteFailed' }));
}
this.closeRemove();
this.loadIssueType();
}).catch((error) => {
message.error(intl.formatMessage({ id: 'deleteFailed' }));
.then((res) => {
if (res) {
message.success(intl.formatMessage({ id: 'editSuccess' }));
} else {
message.error(intl.formatMessage({ id: 'editFailed' }));
}
this.setState({
submitting: false,
});
this.handleClose();
}).catch(() => {
message.error(intl.formatMessage({ id: 'editFailed' }));
.then((data) => {
if (data) {
message.success(intl.formatMessage({ id: 'deleteSuccess' }));
} else {
message.error(intl.formatMessage({ id: 'deleteFailed' }));
}
this.closeRemove();
this.loadSchemeList();
}).catch((error) => {
message.error(intl.formatMessage({ id: 'deleteFailed' }));
.then((data) => {
if (data) {
message.success(intl.formatMessage({ id: 'deleteSuccess' }));
} else {
message.error(intl.formatMessage({ id: 'deleteFailed' }));
}
this.closeRemove();
this.loadStateMachine(page, pageSize, sorter, tableParam);
}).catch((error) => {
message.error(intl.formatMessage({ id: 'deleteFailed' }));
try {
await IssueTypeScreenSchemesStore.createScheme(orgId, data);
message.success(intl.formatMessage({ id: 'createSuccess' }));
this.handleCreateCancel();
} catch (error) {
message.error(intl.formatMessage({ id: 'createFailed' }));
}
} else if (type === 'edit') {
data.objectVersionNumber = scheme.objectVersionNumber;
data.id = scheme.id;
try {
await IssueTypeScreenSchemesStore.updateScheme(orgId, scheme.id, data);
message.success(intl.formatMessage({ id: 'editSuccess' }));
this.handleCreateCancel();
} catch (error) {
message.success(intl.formatMessage({ id: 'editFailed' }));
}
}
this.setState({
spinning: false,
});
}
});
};
StateMachineSchemeStore.deleteStateMachineScheme(organizationId, schemeId).then((data) => {
if (data) {
message.success(intl.formatMessage({ id: 'deleteSuccess' }));
} else {
message.error(intl.formatMessage({ id: 'deleteFailed' }));
}
StateMachineSchemeStore.setIsSchemeDeleteVisible(false);
this.refresh();
}).catch((error) => {
message.error(intl.formatMessage({ id: 'deleteFailed' }));
.then((data) => {
if (data) {
message.success(intl.formatMessage({ id: 'deleteSuccess' }));
} else {
message.error(intl.formatMessage({ id: 'deleteFailed' }));
}
this.closeRemove();
this.loadIssueType();
}).catch((error) => {
message.error(intl.formatMessage({ id: 'deleteFailed' }));
data.organizationId = orgId;
data.lineVOS = associations;
if (type === 'create') {
try {
await IssueTypeScreenSchemesStore.createScheme(orgId, data);
message.success(intl.formatMessage({ id: 'createSuccess' }));
this.handleCreateCancel();
} catch (error) {
message.error(intl.formatMessage({ id: 'createFailed' }));
}
} else if (type === 'edit') {
data.objectVersionNumber = scheme.objectVersionNumber;
data.id = scheme.id;
try {
await IssueTypeScreenSchemesStore.updateScheme(orgId, scheme.id, data);
message.success(intl.formatMessage({ id: 'editSuccess' }));
this.handleCreateCancel();
} catch (error) {
message.success(intl.formatMessage({ id: 'editFailed' }));
}
}
this.setState({
spinning: false,
});
}
});
};