Commit 329dce88 by Liu

fix:提问接口参数

parent 9336bcb8
...@@ -239,6 +239,8 @@ export const Chat: React.FC = () => { ...@@ -239,6 +239,8 @@ export const Chat: React.FC = () => {
/** 提交问题 */ /** 提交问题 */
const handleSubmitQuestion = async (question: string, productCode?: string, toolId?: string) => { const handleSubmitQuestion = async (question: string, productCode?: string, toolId?: string) => {
const resolvedToolId = toolId ?? currentToolId ?? undefined const resolvedToolId = toolId ?? currentToolId ?? undefined
const busiType = '01'
const recordType = 'A01'
// 停止之前的请求 // 停止之前的请求
if (abortControllerRef.current) { if (abortControllerRef.current) {
abortControllerRef.current.abort() abortControllerRef.current.abort()
...@@ -288,6 +290,8 @@ export const Chat: React.FC = () => { ...@@ -288,6 +290,8 @@ export const Chat: React.FC = () => {
stream: true, stream: true,
productCode, productCode,
toolId: resolvedToolId, toolId: resolvedToolId,
busiType,
recordType,
}, },
(msg) => { (msg) => {
// 检查是否已被取消 // 检查是否已被取消
......
...@@ -240,6 +240,8 @@ export const Chat: React.FC = () => { ...@@ -240,6 +240,8 @@ export const Chat: React.FC = () => {
/** 提交问题 */ /** 提交问题 */
const handleSubmitQuestion = async (question: string, productCode?: string, toolId?: string) => { const handleSubmitQuestion = async (question: string, productCode?: string, toolId?: string) => {
const resolvedToolId = toolId ?? currentToolId ?? undefined const resolvedToolId = toolId ?? currentToolId ?? undefined
const busiType = '02'
const recordType = 'A02'
// 停止之前的请求 // 停止之前的请求
if (abortControllerRef.current) { if (abortControllerRef.current) {
abortControllerRef.current.abort() abortControllerRef.current.abort()
...@@ -289,6 +291,8 @@ export const Chat: React.FC = () => { ...@@ -289,6 +291,8 @@ export const Chat: React.FC = () => {
stream: true, stream: true,
productCode, productCode,
toolId: resolvedToolId, toolId: resolvedToolId,
busiType,
recordType,
}, },
(msg) => { (msg) => {
// 检查是否已被取消 // 检查是否已被取消
......
...@@ -7,6 +7,8 @@ import styles from './Home.module.less' ...@@ -7,6 +7,8 @@ import styles from './Home.module.less'
import { QuestionList } from './components/QuestionList' import { QuestionList } from './components/QuestionList'
import HomeIcon2 from '@/assets/homeIcon2.png' import HomeIcon2 from '@/assets/homeIcon2.png'
import SmartIce from '@/assets/smart-ice.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 { clearCurrentToolId, createConversation, fetchConversations, setCurrentToolId } from '@/store/conversationSlice'
import { useAppDispatch } from '@/store/hook' import { useAppDispatch } from '@/store/hook'
import { fetchEfficiencyQuestionList } from '@/api/home' import { fetchEfficiencyQuestionList } from '@/api/home'
...@@ -264,9 +266,15 @@ export const Home: React.FC = () => { ...@@ -264,9 +266,15 @@ export const Home: React.FC = () => {
<div className="box flex flex-col h-full w-full"> <div className="box flex flex-col h-full w-full">
<div className="flex-1 items-center pt-[24px] sm:pt-[32px] scrollbar-hide"> <div className="flex-1 items-center pt-[24px] sm:pt-[32px] scrollbar-hide">
{isFromTactics && ( {isFromTactics && (
<div className="flex items-center text-right justify-end"> <div className="flex items-center justify-end gap-[20px] text-[14px] leading-[22px] text-[#2F88FF]">
<div>清空历史</div> <div className="flex items-center gap-[6px] cursor-pointer">
<div>重新分析</div> <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>
)} )}
<div className="w-full"> <div className="w-full">
...@@ -312,10 +320,10 @@ export const Home: React.FC = () => { ...@@ -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 <div
className="w-full h-full bg-transparent box-border rounded-[24px]" 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 /> <Outlet />
</div> </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