refactor: Optimization of operation menu

--bug=1054069 --user=王孝刚 【操作日志】-操作菜单优化建议 https://www.tapd.cn/57709429/s/1677900
This commit is contained in:
wxg0103 2025-03-28 11:43:48 +08:00 committed by wxg
parent bd098e68e5
commit 4ffec85e9b
6 changed files with 57 additions and 23 deletions

View File

@ -644,8 +644,6 @@ class Application(APIView):
dynamic_tag=keywords.get(
'application_id'))],
compare=CompareConstants.AND))
@log(menu='Application', operate="speech to text",
get_operation_object=lambda r, k: get_application_operation_object(k.get('application_id')))
def post(self, request: Request, application_id: str):
return result.success(
ApplicationSerializer.Operate(data={'application_id': application_id, 'user_id': request.user.id})
@ -668,8 +666,6 @@ class Application(APIView):
dynamic_tag=keywords.get(
'application_id'))],
compare=CompareConstants.AND))
@log(menu='Application', operate="text to speech",
get_operation_object=lambda r, k: get_application_operation_object(k.get('application_id')))
def post(self, request: Request, application_id: str):
byte_data = ApplicationSerializer.Operate(
data={'application_id': application_id, 'user_id': request.user.id}).text_to_speech(

View File

@ -60,6 +60,8 @@ class ChatView(APIView):
[lambda r, keywords: Permission(group=Group.APPLICATION, operate=Operate.USE,
dynamic_tag=keywords.get('application_id'))])
)
@log(menu='Conversation Log', operate="Export conversation",
get_operation_object=lambda r, k: get_application_operation_object(k.get('application_id')))
def post(self, request: Request, application_id: str):
return ChatSerializers.Query(
data={**query_params_to_single_dict(request.query_params), 'application_id': application_id,

View File

@ -234,7 +234,7 @@ msgstr ""
#: apps/xpack/serializers/channel/chat_manage.py:298
msgid "Thinking, please wait a moment!"
msgstr ""
msgstr "Thinking, please wait a moment......"
#: apps/xpack/serializers/channel/ding_talk.py:19
#: apps/xpack/serializers/channel/wechat.py:89
@ -1210,7 +1210,7 @@ msgstr "Details"
#: apps/xpack/views/application_setting_views.py:23
#| msgid "Modification time"
msgid "Modify Application Settings"
msgstr ""
msgstr "Modify Application Display Settings"
#: apps/xpack/views/application_setting_views.py:24
#: apps/xpack/views/application_setting_views.py:40
@ -4478,7 +4478,7 @@ msgstr ""
#: community/apps/dataset/views/dataset.py:184
#: community/apps/dataset/views/dataset.py:185
msgid "Export knowledge base containing images"
msgstr ""
msgstr "Export ZIP Knowledge Base"
#: community/apps/dataset/views/dataset.py:199
msgid "Delete knowledge base"
@ -7448,7 +7448,7 @@ msgid "Operate Time"
msgstr "Operate time"
msgid "System Settings/API Key"
msgstr "System Settings/API Key"
msgstr "System API Key"
msgid "Appearance Settings"
msgstr "Appearance Settings"
@ -7463,4 +7463,13 @@ msgid "Paragraph"
msgstr ""
msgid "Batch generate related"
msgstr "Paragraph generate related problems"
msgid "Application access"
msgstr ""
msgid "Add internal function"
msgstr ""
msgid "Batch generate related documents"
msgstr "Batch generate related problems"

View File

@ -234,7 +234,7 @@ msgstr "AI 回复: "
#: apps/xpack/serializers/channel/chat_manage.py:298
msgid "Thinking, please wait a moment!"
msgstr "正在思考中,请稍后"
msgstr "正在思考中,请稍后......"
#: apps/xpack/serializers/channel/ding_talk.py:19
#: apps/xpack/serializers/channel/wechat.py:89
@ -1229,7 +1229,7 @@ msgstr "详情"
#: apps/xpack/views/application_setting_views.py:23
#| msgid "Pro/Modify Application Settings"
msgid "Modify Application Settings"
msgstr "修改应用设置"
msgstr "修改应用显示设置"
#: apps/xpack/views/application_setting_views.py:24
#: apps/xpack/views/application_setting_views.py:40
@ -4515,7 +4515,7 @@ msgstr "导出知识库"
#: community/apps/dataset/views/dataset.py:184
#: community/apps/dataset/views/dataset.py:185
msgid "Export knowledge base containing images"
msgstr "导出包含图片的知识库"
msgstr "导出ZIP知识库"
#: community/apps/dataset/views/dataset.py:199
msgid "Delete knowledge base"
@ -4606,12 +4606,12 @@ msgstr "批量取消任务"
#: community/apps/dataset/views/document.py:279
#: community/apps/dataset/views/document.py:280
msgid "Refresh document vector library"
msgstr "刷新文档向量库"
msgstr "文档向量化"
#: community/apps/dataset/views/document.py:300
#: community/apps/dataset/views/document.py:301
msgid "Batch refresh document vector library"
msgstr "批量刷新文档向量库"
msgstr "批量文档向量化"
#: community/apps/dataset/views/document.py:319
#: community/apps/dataset/views/document.py:320
@ -7611,7 +7611,7 @@ msgid "Operate Time"
msgstr "操作时间"
msgid "System Settings/API Key"
msgstr "系统设置/API Key"
msgstr "系统 API Key"
msgid "Appearance Settings"
msgstr "外观设置"
@ -7626,4 +7626,13 @@ msgid "Paragraph"
msgstr "段落"
msgid "Batch generate related"
msgstr "批量生成相关问题"
msgstr "分段生成问题"
msgid "Application access"
msgstr "应用接入"
msgid "Add internal function"
msgstr "添加内部函数"
msgid "Batch generate related documents"
msgstr "批量生成问题"

View File

@ -235,7 +235,7 @@ msgstr "AI 回覆: "
#: apps/xpack/serializers/channel/chat_manage.py:298
msgid "Thinking, please wait a moment!"
msgstr "正在思考,請稍等!"
msgstr "正在思考中,請稍等......"
#: apps/xpack/serializers/channel/ding_talk.py:19
#: apps/xpack/serializers/channel/wechat.py:89
@ -1231,7 +1231,7 @@ msgstr "詳情"
#: apps/xpack/views/application_setting_views.py:23
#| msgid "Pro/Modify Application Settings"
msgid "Modify Application Settings"
msgstr "修改應用設置"
msgstr "修改應用显示設置"
#: apps/xpack/views/application_setting_views.py:24
#: apps/xpack/views/application_setting_views.py:40
@ -4524,7 +4524,7 @@ msgstr "導出知識庫"
#: community/apps/dataset/views/dataset.py:184
#: community/apps/dataset/views/dataset.py:185
msgid "Export knowledge base containing images"
msgstr "導出包含圖片的知識庫"
msgstr "導出ZIP知識庫"
#: community/apps/dataset/views/dataset.py:199
msgid "Delete knowledge base"
@ -4615,12 +4615,12 @@ msgstr "批量取消任務"
#: community/apps/dataset/views/document.py:279
#: community/apps/dataset/views/document.py:280
msgid "Refresh document vector library"
msgstr "刷新文檔向量庫"
msgstr "文檔向量化"
#: community/apps/dataset/views/document.py:300
#: community/apps/dataset/views/document.py:301
msgid "Batch refresh document vector library"
msgstr "批量刷新文檔向量庫"
msgstr "批量文檔向量化"
#: community/apps/dataset/views/document.py:319
#: community/apps/dataset/views/document.py:320
@ -7621,7 +7621,7 @@ msgid "Operate Time"
msgstr "操作時間"
msgid "System Settings/API Key"
msgstr "系統設置/API Key"
msgstr "系統 API Key"
msgid "Appearance Settings"
msgstr "外觀設置"
@ -7636,4 +7636,13 @@ msgid "Paragraph"
msgstr "段落"
msgid "Batch generate related"
msgstr "批量生成相關问题"
msgstr "分段生成问题"
msgid "Application access"
msgstr "應用接入"
msgid "Add internal function"
msgstr "添加內部函數"
msgid "Batch generate related documents"
msgstr "批量生成问题"

View File

@ -129,7 +129,16 @@
</div>
</template>
</el-table-column>
<el-table-column prop="operate" :label="$t('views.operateLog.table.operate.detail')" />
<el-table-column prop="operate" :label="$t('views.operateLog.table.operate.detail')">
<template #default="{ row }">
{{
row.operate +
(row.operation_object && row.operation_object.name
? `${row.operation_object.name}`
: '')
}}
</template>
</el-table-column>
<el-table-column
width="120"
prop="user.username"