Skip to content

Commit

Permalink
fix: 修复类型问题
Browse files Browse the repository at this point in the history
  • Loading branch information
JackySoft authored and jianbing.chen committed Dec 18, 2024
1 parent e785d7e commit d8f9e40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/editor/src/pages/home/workflow/Design.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const Designer = () => {
const { id } = useParams();
useEffect(() => {
api.getTemplateDetail(Number(id)).then((res) => {
setName(res.form_name);
if (res?.template_data) {
const list = JSON.parse(res?.template_data);
setName(res.formName);
if (res?.templateData) {
const list = JSON.parse(res?.templateData);
setNodeList(list);
}
});
Expand All @@ -37,7 +37,7 @@ const Designer = () => {
const handleSave = async () => {
const list = nodeRef.current?.getNodeList();
await api.updateTemplate({
template_data: JSON.stringify(list),
templateData: JSON.stringify(list),
id: Number(id),
});
message.success('保存成功');
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/pages/home/workflow/WorkFlowList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ export default function WorkFlow() {
<div className={styles.projectCard} onClick={() => handleAction(item.id)}>
<Card.Meta
style={{ cursor: 'pointer' }}
title={item.form_name}
title={item.formName}
description={
<>
<DeleteOutlined className={styles.delIcon} onClick={(event) => handleDelete(event, item.id)} />
<p style={{ color: 'rgba(0, 0, 0, 0.88)' }}>{item.form_desc || '暂无描述'}</p>
<p style={{ color: 'rgba(0, 0, 0, 0.88)' }}>{item.formDesc || '暂无描述'}</p>
<p style={{ marginTop: 10 }}>
<UserOutlined style={{ fontSize: 14, marginRight: 5 }} />
{item.userName}
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/pages/publishHistory/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default function PublishHistory() {
pageSize: pagination.pageSize,
env: activeKey,
pageId: parseInt(id),
publish_userId: name,
publishUserId: name,
start,
end,
});
Expand Down Expand Up @@ -185,7 +185,7 @@ export default function PublishHistory() {
await rollbackPage({
pageId: item.pageId,
env: activeKey,
last_publish_id: item.id,
lastPublishId: item.id,
});
message.success('操作成功');
getReleaseVersion();
Expand Down

0 comments on commit d8f9e40

Please sign in to comment.