diff --git a/webapp/packages/chat-sdk/src/components/ChatItem/ExecuteItem.tsx b/webapp/packages/chat-sdk/src/components/ChatItem/ExecuteItem.tsx index a378f4d4b..0a0fa9fdc 100644 --- a/webapp/packages/chat-sdk/src/components/ChatItem/ExecuteItem.tsx +++ b/webapp/packages/chat-sdk/src/components/ChatItem/ExecuteItem.tsx @@ -9,6 +9,7 @@ import React, { ReactNode, useState } from 'react'; type Props = { queryId?: number; + question: string; queryMode?: string; executeLoading: boolean; entitySwitchLoading: boolean; @@ -24,6 +25,7 @@ type Props = { const ExecuteItem: React.FC = ({ queryId, + question, queryMode, executeLoading, entitySwitchLoading, @@ -124,6 +126,7 @@ const ExecuteItem: React.FC = ({ isSimpleMode={isSimpleMode} forceShowTable={showMsgContentTable} queryId={queryId} + question={question} data={data} chartIndex={chartIndex} triggerResize={triggerResize} diff --git a/webapp/packages/chat-sdk/src/components/ChatItem/index.tsx b/webapp/packages/chat-sdk/src/components/ChatItem/index.tsx index 1e8e4079c..5fafa6c25 100644 --- a/webapp/packages/chat-sdk/src/components/ChatItem/index.tsx +++ b/webapp/packages/chat-sdk/src/components/ChatItem/index.tsx @@ -365,6 +365,7 @@ const ChatItem: React.FC = ({ void; }; -const MetricCard: React.FC = ({ data, loading, onApplyAuth }) => { +const MetricCard: React.FC = ({ data, question, loading, onApplyAuth }) => { const { queryMode, queryColumns, queryResults, entityInfo, aggregateInfo } = data; const { metricInfos } = aggregateInfo || {}; @@ -39,11 +40,7 @@ const MetricCard: React.FC = ({ data, loading, onApplyAuth }) => { return (
- {indicatorColumn?.name ? ( -
{indicatorColumn?.name}
- ) : ( -
- )} +
{question}
diff --git a/webapp/packages/chat-sdk/src/components/ChatMsg/Text/index.tsx b/webapp/packages/chat-sdk/src/components/ChatMsg/Text/index.tsx index e9b73f893..7d2b3eaac 100644 --- a/webapp/packages/chat-sdk/src/components/ChatMsg/Text/index.tsx +++ b/webapp/packages/chat-sdk/src/components/ChatMsg/Text/index.tsx @@ -18,7 +18,7 @@ const Text: React.FC = ({ columns, referenceColumn, dataSource }) => { const initData = () => { let textValue = dataSource[0][columns[0].nameEn]; - setText(textValue === undefined ? '暂无数据,如有疑问请联系管理员' : textValue); + setText(textValue === undefined ? '暂无数据' : textValue); if (referenceColumn) { const referenceDataValue = dataSource[0][referenceColumn.nameEn]; setReferenceData(referenceDataValue || []); diff --git a/webapp/packages/chat-sdk/src/components/ChatMsg/index.tsx b/webapp/packages/chat-sdk/src/components/ChatMsg/index.tsx index e6c9c841b..998b75042 100644 --- a/webapp/packages/chat-sdk/src/components/ChatMsg/index.tsx +++ b/webapp/packages/chat-sdk/src/components/ChatMsg/index.tsx @@ -15,6 +15,7 @@ import { isMobile } from '../../utils/utils'; type Props = { queryId?: number; + question: string; data: MsgDataType; chartIndex: number; triggerResize?: boolean; @@ -25,6 +26,7 @@ type Props = { const ChatMsg: React.FC = ({ queryId, + question, data, chartIndex, triggerResize, @@ -176,6 +178,7 @@ const ChatMsg: React.FC = ({ return ( ); @@ -342,7 +345,7 @@ const ChatMsg: React.FC = ({ return (
{dataSource?.length === 0 ? ( -
暂无数据,如有疑问请联系管理员
+
暂无数据
) : (
{getMsgContent()}