Skip to content

fix: 修复日志导出格式不正确的缺陷 #1593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Conversation

shaohuzhang1
Copy link
Contributor

fix: 修复日志导出格式不正确的缺陷 --bug=1048673 --user=王孝刚 【应用】导出对话日志是xls格式,excel 打开提示文件格式不对 https://www.tapd.cn/57709429/s/1608292

--bug=1048673 --user=王孝刚 【应用】导出对话日志是xls格式,excel 打开提示文件格式不对 https://www.tapd.cn/57709429/s/1608292
param,
data,
loading
)
}

/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个函数exportChatLog没有明显的缺陷,但是它有一些不明确或可能需要改进的地方。

  1. 在参数中使用引号会导致一些浏览器和库出现兼容性问题。
  2. 函数名拼写错误,应该从'excel'改成'xls'
  3. 参数data, loading未定义

我为您推荐一个修改后的版本:

const exportChatLog = async ({ application_id }, {
 param, 
 data, 
 loading
}) => {
  await exportExcel({
    fileName: `${prefix}/${application_id}/chat/export.xlsx`
  })
  return { 
    success: true,
  };
};

这样可以避免字符串拼写错误,并将数据传递给exportExcelPost方法。

Copy link

f2c-ci-robot bot commented Nov 11, 2024

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

f2c-ci-robot bot commented Nov 11, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wxg0103 wxg0103 merged commit 6e6f564 into main Nov 11, 2024
4 of 5 checks passed
@wxg0103 wxg0103 deleted the pr@main@fix_1048673 branch November 11, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants