Commit 329dce88 by Liu

fix:提问接口参数

parent 9336bcb8
......@@ -239,6 +239,8 @@ export const Chat: React.FC = () => {
/** 提交问题 */
const handleSubmitQuestion = async (question: string, productCode?: string, toolId?: string) => {
const resolvedToolId = toolId ?? currentToolId ?? undefined
const busiType = '01'
const recordType = 'A01'
// 停止之前的请求
if (abortControllerRef.current) {
abortControllerRef.current.abort()
......@@ -288,6 +290,8 @@ export const Chat: React.FC = () => {
stream: true,
productCode,
toolId: resolvedToolId,
busiType,
recordType,
},
(msg) => {
// 检查是否已被取消
......
......@@ -240,6 +240,8 @@ export const Chat: React.FC = () => {
/** 提交问题 */
const handleSubmitQuestion = async (question: string, productCode?: string, toolId?: string) => {
const resolvedToolId = toolId ?? currentToolId ?? undefined
const busiType = '02'
const recordType = 'A02'
// 停止之前的请求
if (abortControllerRef.current) {
abortControllerRef.current.abort()
......@@ -289,6 +291,8 @@ export const Chat: React.FC = () => {
stream: true,
productCode,
toolId: resolvedToolId,
busiType,
recordType,
},
(msg) => {
// 检查是否已被取消
......
......@@ -7,6 +7,8 @@ import styles from './Home.module.less'
import { QuestionList } from './components/QuestionList'
import HomeIcon2 from '@/assets/homeIcon2.png'
import SmartIce from '@/assets/smart-ice.png'
import DeleteIcon from '@/assets/svg/delete.svg'
import RefreshIcon from '@/assets/svg/refresh.svg'
import { clearCurrentToolId, createConversation, fetchConversations, setCurrentToolId } from '@/store/conversationSlice'
import { useAppDispatch } from '@/store/hook'
import { fetchEfficiencyQuestionList } from '@/api/home'
......@@ -264,9 +266,15 @@ export const Home: React.FC = () => {
<div className="box flex flex-col h-full w-full">
<div className="flex-1 items-center pt-[24px] sm:pt-[32px] scrollbar-hide">
{isFromTactics && (
<div className="flex items-center text-right justify-end">
<div>清空历史</div>
<div>重新分析</div>
<div className="flex items-center justify-end gap-[20px] text-[14px] leading-[22px] text-[#2F88FF]">
<div className="flex items-center gap-[6px] cursor-pointer">
<img src={DeleteIcon} alt="清除记录" className="w-[14px] h-[14px]" />
<span>清除记录</span>
</div>
<div className="flex items-center gap-[6px] cursor-pointer">
<img src={RefreshIcon} alt="重新分析" className="w-[14px] h-[14px]" />
<span>重新分析</span>
</div>
</div>
)}
<div className="w-full">
......@@ -312,10 +320,10 @@ export const Home: React.FC = () => {
</>
)}
{/* 右侧区域 */}
<div className="hidden sm:flex flex-1 h-full">
<div className="hidden sm:flex h-full flex-none ml-auto">
<div
className="w-full h-full bg-transparent box-border rounded-[24px]"
style={{ height: 'calc(100vh - 64px)', background: '#FFFFFF', padding: '0 30px' }}
style={{ width: '420px', height: 'calc(100vh - 64px)', background: '#FFFFFF', padding: '0 30px' }}
>
<Outlet />
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment