|
@@ -7,11 +7,11 @@ import {
|
|
|
Radio, Switch, Row, Col, Slider, Space, RadioChangeEvent,
|
|
Radio, Switch, Row, Col, Slider, Space, RadioChangeEvent,
|
|
|
Spin, message, Typography, Tooltip,
|
|
Spin, message, Typography, Tooltip,
|
|
|
Cascader,
|
|
Cascader,
|
|
|
- Tag, Modal, Table,TablePaginationConfig,Drawer
|
|
|
|
|
|
|
+ Tag, Modal, Table, TablePaginationConfig, Drawer
|
|
|
} from 'antd';
|
|
} from 'antd';
|
|
|
import type { TableProps } from 'antd';
|
|
import type { TableProps } from 'antd';
|
|
|
|
|
|
|
|
-import { PlusCircleOutlined, MinusCircleOutlined, ArrowLeftOutlined, InfoCircleOutlined,CloseCircleOutlined,LinkOutlined } from '@ant-design/icons';
|
|
|
|
|
|
|
+import { PlusCircleOutlined, MinusCircleOutlined, ArrowLeftOutlined, InfoCircleOutlined, CloseCircleOutlined, LinkOutlined } from '@ant-design/icons';
|
|
|
import { apis } from '@/apis';
|
|
import { apis } from '@/apis';
|
|
|
import router from '@/router';
|
|
import router from '@/router';
|
|
|
import LocalStorage from '@/LocalStorage';
|
|
import LocalStorage from '@/LocalStorage';
|
|
@@ -27,8 +27,8 @@ const Index = 1;
|
|
|
|
|
|
|
|
const QuestionAnswerInfo: React.FC = () => {
|
|
const QuestionAnswerInfo: React.FC = () => {
|
|
|
|
|
|
|
|
- const { state,onChangePagination,onFetchUserListApi } = store;
|
|
|
|
|
- const { page,sourceData } = state;
|
|
|
|
|
|
|
+ const { state, onChangePagination, onFetchUserListApi } = store;
|
|
|
|
|
+ const { page, sourceData } = state;
|
|
|
|
|
|
|
|
|
|
|
|
|
const [form] = Form.useForm();
|
|
const [form] = Form.useForm();
|
|
@@ -125,7 +125,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
value: string,
|
|
value: string,
|
|
|
}[],
|
|
}[],
|
|
|
}[];
|
|
}[];
|
|
|
- const tagRender = (props:any) => {
|
|
|
|
|
|
|
+ const tagRender = (props: any) => {
|
|
|
const { label, value, closable, onClose } = props;
|
|
const { label, value, closable, onClose } = props;
|
|
|
return (
|
|
return (
|
|
|
<Tag
|
|
<Tag
|
|
@@ -141,30 +141,30 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
fontSize: 12,
|
|
fontSize: 12,
|
|
|
cursor: 'pointer',
|
|
cursor: 'pointer',
|
|
|
}}
|
|
}}
|
|
|
- onMouseDown={(e) => {
|
|
|
|
|
- e.stopPropagation();
|
|
|
|
|
- e.preventDefault();
|
|
|
|
|
- }}
|
|
|
|
|
- onMouseUp={(e) => {
|
|
|
|
|
- e.stopPropagation();
|
|
|
|
|
- e.preventDefault();
|
|
|
|
|
- }}
|
|
|
|
|
- // 自定义图标点击事件
|
|
|
|
|
- onClick={(e) => {
|
|
|
|
|
- // 阻止事件冒泡到Tag,避免触发删除
|
|
|
|
|
- e.stopPropagation();
|
|
|
|
|
- e.preventDefault();
|
|
|
|
|
- knowledgeList.forEach((item) => {
|
|
|
|
|
- if (item.value === value) {
|
|
|
|
|
- // router.navigate({ pathname: `/deepseek/knowledgeLib/${value}/${item.createBy}`,},);
|
|
|
|
|
- setDrawerItem(item);
|
|
|
|
|
- setOpenDrawer(true)
|
|
|
|
|
- e.stopPropagation();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- // console.log('点击了额外图标,当前选项值:', value,props);
|
|
|
|
|
- // 这里可以添加你的业务逻辑,如:打开详情、编辑等
|
|
|
|
|
- }} />
|
|
|
|
|
|
|
+ onMouseDown={(e) => {
|
|
|
|
|
+ e.stopPropagation();
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
+ }}
|
|
|
|
|
+ onMouseUp={(e) => {
|
|
|
|
|
+ e.stopPropagation();
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
+ }}
|
|
|
|
|
+ // 自定义图标点击事件
|
|
|
|
|
+ onClick={(e) => {
|
|
|
|
|
+ // 阻止事件冒泡到Tag,避免触发删除
|
|
|
|
|
+ e.stopPropagation();
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
+ knowledgeList.forEach((item) => {
|
|
|
|
|
+ if (item.value === value) {
|
|
|
|
|
+ // router.navigate({ pathname: `/deepseek/knowledgeLib/${value}/${item.createBy}`,},);
|
|
|
|
|
+ setDrawerItem(item);
|
|
|
|
|
+ setOpenDrawer(true)
|
|
|
|
|
+ e.stopPropagation();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ // console.log('点击了额外图标,当前选项值:', value,props);
|
|
|
|
|
+ // 这里可以添加你的业务逻辑,如:打开详情、编辑等
|
|
|
|
|
+ }} />
|
|
|
</Tag>
|
|
</Tag>
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
@@ -181,7 +181,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
const [name, setName] = React.useState('');
|
|
const [name, setName] = React.useState('');
|
|
|
const [appTypeList, setAppTypeList] = React.useState<AppTypeList>([]);
|
|
const [appTypeList, setAppTypeList] = React.useState<AppTypeList>([]);
|
|
|
const [appVisibleList, setAppVisibleList] = React.useState<AppTypeList>([]); // 是否公开
|
|
const [appVisibleList, setAppVisibleList] = React.useState<AppTypeList>([]); // 是否公开
|
|
|
- const [visibleFlag, setVisibleFlag] = React.useState<string|number>(0); // 是否公开用来判断是否展示VIP用户
|
|
|
|
|
|
|
+ const [visibleFlag, setVisibleFlag] = React.useState<string | number>(0); // 是否公开用来判断是否展示VIP用户
|
|
|
const [updateFlag, setUpdateFlag] = React.useState<boolean>();
|
|
const [updateFlag, setUpdateFlag] = React.useState<boolean>();
|
|
|
const [createFlag, setCreateFlag] = React.useState<boolean>();
|
|
const [createFlag, setCreateFlag] = React.useState<boolean>();
|
|
|
const [appProjectList, setAppProjectList] = React.useState<AppTypeList>([]);
|
|
const [appProjectList, setAppProjectList] = React.useState<AppTypeList>([]);
|
|
@@ -207,13 +207,13 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
api.fetchKnowlegde(),
|
|
api.fetchKnowlegde(),
|
|
|
api.fetchAppType(),
|
|
api.fetchAppType(),
|
|
|
// api.fetchModelList(),
|
|
// api.fetchModelList(),
|
|
|
- api.fetchAppProType(),
|
|
|
|
|
|
|
+ // api.fetchAppProType(),
|
|
|
api.fetchAppVisible(id)
|
|
api.fetchAppVisible(id)
|
|
|
])
|
|
])
|
|
|
if (id) {
|
|
if (id) {
|
|
|
await api.fetchDetail(id);
|
|
await api.fetchDetail(id);
|
|
|
}
|
|
}
|
|
|
- onFetchUserListApi('','','');
|
|
|
|
|
|
|
+ onFetchUserListApi('', '', '');
|
|
|
await api.fetchUserType();
|
|
await api.fetchUserType();
|
|
|
}
|
|
}
|
|
|
React.useEffect(() => {
|
|
React.useEffect(() => {
|
|
@@ -338,13 +338,12 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
} else {
|
|
} else {
|
|
|
setIsAppPro(false);
|
|
setIsAppPro(false);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ projectApi.fetchProject('', info.appProId); // 获取项目列表
|
|
|
// if (info.model === 'Qwen3-30B') {
|
|
// if (info.model === 'Qwen3-30B') {
|
|
|
// setIsDeepThinkVisible(true);
|
|
// setIsDeepThinkVisible(true);
|
|
|
// } else {
|
|
// } else {
|
|
|
- setIsDeepThinkVisible(false);
|
|
|
|
|
|
|
+ setIsDeepThinkVisible(false);
|
|
|
// }
|
|
// }
|
|
|
-
|
|
|
|
|
form.setFieldsValue({
|
|
form.setFieldsValue({
|
|
|
id: info.id,
|
|
id: info.id,
|
|
|
name: info.name, //应用名称
|
|
name: info.name, //应用名称
|
|
@@ -361,7 +360,6 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
questionList: sd, //问题列表
|
|
questionList: sd, //问题列表
|
|
|
max_token: info.maxToken, //应用最大token
|
|
max_token: info.maxToken, //应用最大token
|
|
|
updateDate: info.updateDate, // 更新时间
|
|
updateDate: info.updateDate, // 更新时间
|
|
|
- appProId: info.appProId?.join('-'),// 项目
|
|
|
|
|
typeId: info.typeId, //应用类型
|
|
typeId: info.typeId, //应用类型
|
|
|
visible: info.visible || '0', //是否公开
|
|
visible: info.visible || '0', //是否公开
|
|
|
sort: info.sort || null, //显示顺序
|
|
sort: info.sort || null, //显示顺序
|
|
@@ -379,7 +377,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
//rerank_index_type_list: info.rerank_index_type_list, //知识库id
|
|
//rerank_index_type_list: info.rerank_index_type_list, //知识库id
|
|
|
})
|
|
})
|
|
|
setVisibleFlag(info.visible || '0')
|
|
setVisibleFlag(info.visible || '0')
|
|
|
- if(info.vipList&&info.vipList.length>0){
|
|
|
|
|
|
|
+ if (info.vipList && info.vipList.length > 0) {
|
|
|
setVipList(info.vipList);
|
|
setVipList(info.vipList);
|
|
|
}
|
|
}
|
|
|
if (sd.length > 0) {
|
|
if (sd.length > 0) {
|
|
@@ -482,10 +480,10 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
fetchAppProType: async () => {
|
|
fetchAppProType: async () => {
|
|
|
try {
|
|
try {
|
|
|
const res = await apis.fetchTakaiAppTypeList('projectTree');
|
|
const res = await apis.fetchTakaiAppTypeList('projectTree');
|
|
|
- console.log('res.data',res.data)
|
|
|
|
|
- const list: AppTypeList = res.data?.reduce((acc:any,item: any) => {
|
|
|
|
|
- if(item.children.length>0){
|
|
|
|
|
- item.children.forEach((val:any)=>{
|
|
|
|
|
|
|
+ console.log('res.data', res.data)
|
|
|
|
|
+ const list: AppTypeList = res.data?.reduce((acc: any, item: any) => {
|
|
|
|
|
+ if (item.children.length > 0) {
|
|
|
|
|
+ item.children.forEach((val: any) => {
|
|
|
acc.push({
|
|
acc.push({
|
|
|
label: val.label,
|
|
label: val.label,
|
|
|
value: `${item.value}-${val.value}`,
|
|
value: `${item.value}-${val.value}`,
|
|
@@ -493,7 +491,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
return acc;
|
|
return acc;
|
|
|
- },[]);
|
|
|
|
|
|
|
+ }, []);
|
|
|
setAppProjectList(list);
|
|
setAppProjectList(list);
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
|
console.error(error);
|
|
console.error(error);
|
|
@@ -503,11 +501,11 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
fetchUserListApi: async () => {
|
|
fetchUserListApi: async () => {
|
|
|
try {
|
|
try {
|
|
|
const res = await apis.fetchUserListApi({
|
|
const res = await apis.fetchUserListApi({
|
|
|
- pageNum:page.pageNumber,
|
|
|
|
|
|
|
+ pageNum: page.pageNumber,
|
|
|
pageSize: page.pageSize,
|
|
pageSize: page.pageSize,
|
|
|
- userName:userName,
|
|
|
|
|
- nickName:userNickName,
|
|
|
|
|
- userType:userType
|
|
|
|
|
|
|
+ userName: userName,
|
|
|
|
|
+ nickName: userNickName,
|
|
|
|
|
+ userType: userType
|
|
|
});
|
|
});
|
|
|
// setSourceData(res.rows)
|
|
// setSourceData(res.rows)
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -515,7 +513,40 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ type ProjectTypeList = {
|
|
|
|
|
+ label: string,
|
|
|
|
|
+ value: string,
|
|
|
|
|
+ }[];
|
|
|
|
|
+ const [fetching, setFetching] = React.useState(false);
|
|
|
|
|
+ const [projectList, setProjectList] = React.useState<ProjectTypeList>([]);
|
|
|
|
|
|
|
|
|
|
+ // 获取项目列表
|
|
|
|
|
+ const projectApi = {
|
|
|
|
|
+ fetchProject: async (name: string = '', projectId?: string) => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ setFetching(true);
|
|
|
|
|
+ const res = await apis.fetchTakaiProjectLibApi(name, projectId);
|
|
|
|
|
+ const list = res.data.map((item: any) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ label: item.projectName,
|
|
|
|
|
+ value: item.projectId,
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ setFetching(false);
|
|
|
|
|
+ setProjectList(list);
|
|
|
|
|
+ if (projectId) {
|
|
|
|
|
+ const findItem = list.find((item: any) => item.value == projectId);
|
|
|
|
|
+ if (findItem) {
|
|
|
|
|
+ form.setFieldsValue({
|
|
|
|
|
+ appProId: findItem.value
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error: any) {
|
|
|
|
|
+ console.error(error);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ };
|
|
|
const handleRedioClick = (value: string) => {
|
|
const handleRedioClick = (value: string) => {
|
|
|
setIsVisibleCus(false);
|
|
setIsVisibleCus(false);
|
|
|
if (value === 'strict') {
|
|
if (value === 'strict') {
|
|
@@ -593,9 +624,10 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
max_token: values.max_token, //应用最大token
|
|
max_token: values.max_token, //应用最大token
|
|
|
typeId: values.typeId, // 应用类型
|
|
typeId: values.typeId, // 应用类型
|
|
|
visible: values.visible, // 是否公开
|
|
visible: values.visible, // 是否公开
|
|
|
- sort: values.sort||null, // 显示顺序
|
|
|
|
|
|
|
+ sort: values.sort || null, // 显示顺序
|
|
|
vipList: vipList, // vip用户列表
|
|
vipList: vipList, // vip用户列表
|
|
|
- appProId: Array.isArray(values?.appProId) ? values.appProId?.[0]?.split('-') : values?.appProId?.split('-')?? null, // 项目
|
|
|
|
|
|
|
+ // appProId: Array.isArray(values?.appProId) ? values.appProId?.[0]?.split('-') : values?.appProId?.split('-') ?? null, // 项目
|
|
|
|
|
+ appProId: values?.appProId, // 项目
|
|
|
userId: userId, // 用户id
|
|
userId: userId, // 用户id
|
|
|
};
|
|
};
|
|
|
// console.log(info, 'info data----');
|
|
// console.log(info, 'info data----');
|
|
@@ -641,14 +673,14 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
选择VIP用户弹窗start
|
|
选择VIP用户弹窗start
|
|
|
*/
|
|
*/
|
|
|
const [isModalOpen, setIsModalOpen] = React.useState(false);
|
|
const [isModalOpen, setIsModalOpen] = React.useState(false);
|
|
|
- let falgVipList:any = [];
|
|
|
|
|
|
|
+ let falgVipList: any = [];
|
|
|
const handleOk = () => {
|
|
const handleOk = () => {
|
|
|
setIsModalOpen(false);
|
|
setIsModalOpen(false);
|
|
|
- let vipListFalg:any = [...vipList];
|
|
|
|
|
- const vipIds = new Set(vipListFalg.map((vip:any) => vip.userId));
|
|
|
|
|
|
|
+ let vipListFalg: any = [...vipList];
|
|
|
|
|
+ const vipIds = new Set(vipListFalg.map((vip: any) => vip.userId));
|
|
|
const merged = [...vipListFalg];
|
|
const merged = [...vipListFalg];
|
|
|
|
|
|
|
|
- falgVipList.forEach((item:any) => {
|
|
|
|
|
|
|
+ falgVipList.forEach((item: any) => {
|
|
|
if (!vipIds.has(item.userId)) {
|
|
if (!vipIds.has(item.userId)) {
|
|
|
merged.push(item);
|
|
merged.push(item);
|
|
|
}
|
|
}
|
|
@@ -682,7 +714,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
pageSize: page.pageSize,
|
|
pageSize: page.pageSize,
|
|
|
total: page.total,
|
|
total: page.total,
|
|
|
onChange: async (page, pageSize) => {
|
|
onChange: async (page, pageSize) => {
|
|
|
- await onChangePagination(page, pageSize,userName,userNickName,userType);
|
|
|
|
|
|
|
+ await onChangePagination(page, pageSize, userName, userNickName, userType);
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -728,22 +760,22 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
width='80%'
|
|
width='80%'
|
|
|
>
|
|
>
|
|
|
<div className='modal_top'>
|
|
<div className='modal_top'>
|
|
|
- <Input placeholder="请输入用户昵称" allowClear onChange={(e)=>{
|
|
|
|
|
|
|
+ <Input placeholder="请输入用户昵称" allowClear onChange={(e) => {
|
|
|
setUserNickName(e.target.value)
|
|
setUserNickName(e.target.value)
|
|
|
}} />
|
|
}} />
|
|
|
- <Input placeholder="请输入用户名称" allowClear onChange={(e)=>{
|
|
|
|
|
|
|
+ <Input placeholder="请输入用户名称" allowClear onChange={(e) => {
|
|
|
setUserName(e.target.value)
|
|
setUserName(e.target.value)
|
|
|
}} />
|
|
}} />
|
|
|
<Select
|
|
<Select
|
|
|
placeholder='请选择用户类型'
|
|
placeholder='请选择用户类型'
|
|
|
style={{ width: 150 }}
|
|
style={{ width: 150 }}
|
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
|
- if(e === undefined){
|
|
|
|
|
|
|
+ if (e === undefined) {
|
|
|
setUserType('')
|
|
setUserType('')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
setUserType(e)
|
|
setUserType(e)
|
|
|
- }}
|
|
|
|
|
|
|
+ }}
|
|
|
allowClear={true}
|
|
allowClear={true}
|
|
|
>
|
|
>
|
|
|
{
|
|
{
|
|
@@ -759,7 +791,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
border: '1px solid #1677ff',
|
|
border: '1px solid #1677ff',
|
|
|
color: '#1677ff'
|
|
color: '#1677ff'
|
|
|
}}
|
|
}}
|
|
|
- onClick={() => { onFetchUserListApi(userName,userNickName,userType) }}
|
|
|
|
|
|
|
+ onClick={() => { onFetchUserListApi(userName, userNickName, userType) }}
|
|
|
> 搜索 </Button>
|
|
> 搜索 </Button>
|
|
|
{/* <Button value="large"
|
|
{/* <Button value="large"
|
|
|
onClick={() => { api.fetchUserListApi() }}
|
|
onClick={() => { api.fetchUserListApi() }}
|
|
@@ -773,33 +805,33 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
/*
|
|
/*
|
|
|
选择VIP用户弹窗end
|
|
选择VIP用户弹窗end
|
|
|
*/
|
|
*/
|
|
|
- /*
|
|
|
|
|
- 查看引用知识库抽屉start
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ 查看引用知识库抽屉start
|
|
|
|
|
+ */
|
|
|
const [openDrawer, setOpenDrawer] = React.useState(false);
|
|
const [openDrawer, setOpenDrawer] = React.useState(false);
|
|
|
- const [drawerItem,setDrawerItem] = React.useState<any>({});
|
|
|
|
|
|
|
+ const [drawerItem, setDrawerItem] = React.useState<any>({});
|
|
|
const onCloseDrawer = () => {
|
|
const onCloseDrawer = () => {
|
|
|
setOpenDrawer(false);
|
|
setOpenDrawer(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const DrawerDetail = ()=>{
|
|
|
|
|
|
|
+ const DrawerDetail = () => {
|
|
|
return (
|
|
return (
|
|
|
- <Drawer
|
|
|
|
|
|
|
+ <Drawer
|
|
|
title={drawerItem?.label}
|
|
title={drawerItem?.label}
|
|
|
width={'80%'}
|
|
width={'80%'}
|
|
|
closable={{ 'aria-label': 'Close Button' }}
|
|
closable={{ 'aria-label': 'Close Button' }}
|
|
|
onClose={onCloseDrawer}
|
|
onClose={onCloseDrawer}
|
|
|
open={openDrawer}
|
|
open={openDrawer}
|
|
|
- style={{zIndex:11111}}
|
|
|
|
|
|
|
+ style={{ zIndex: 11111 }}
|
|
|
>
|
|
>
|
|
|
<DrawerIndex drawerItem={drawerItem}></DrawerIndex>
|
|
<DrawerIndex drawerItem={drawerItem}></DrawerIndex>
|
|
|
</Drawer>
|
|
</Drawer>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /*
|
|
|
|
|
- 查看引用知识库抽屉end
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ 查看引用知识库抽屉end
|
|
|
|
|
+ */
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
<div className='questionAnswerInfo'>
|
|
<div className='questionAnswerInfo'>
|
|
@@ -810,13 +842,13 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
initialValues={{
|
|
initialValues={{
|
|
|
isDeepThink: 'N',
|
|
isDeepThink: 'N',
|
|
|
max_token: 4096,
|
|
max_token: 4096,
|
|
|
- model:'Qwen3-30B-vl-chat',
|
|
|
|
|
|
|
+ model: 'Qwen3-30B-vl-chat',
|
|
|
show_recall_result: true,
|
|
show_recall_result: true,
|
|
|
- rerank_model_name:'rerank',
|
|
|
|
|
- slice_config_type:'customized',
|
|
|
|
|
|
|
+ rerank_model_name: 'rerank',
|
|
|
|
|
+ slice_config_type: 'customized',
|
|
|
rerank_status: true,
|
|
rerank_status: true,
|
|
|
- param_desc:'strict',
|
|
|
|
|
- recall_method:'mixed'
|
|
|
|
|
|
|
+ param_desc: 'strict',
|
|
|
|
|
+ recall_method: 'mixed'
|
|
|
}}
|
|
}}
|
|
|
>
|
|
>
|
|
|
<div style={{ display: step === 1 ? 'block' : 'none' }} className='questionAnswerInfo-content'>
|
|
<div style={{ display: step === 1 ? 'block' : 'none' }} className='questionAnswerInfo-content'>
|
|
@@ -825,7 +857,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='name'
|
|
name='name'
|
|
|
rules={[{ required: true, message: '问答应用名称不能为空' }]}
|
|
rules={[{ required: true, message: '问答应用名称不能为空' }]}
|
|
|
>
|
|
>
|
|
|
- <Input placeholder="请输入问答应用名称" className='form-element-standard' style={{ height: '48px'}}/>
|
|
|
|
|
|
|
+ <Input placeholder="请输入问答应用名称" className='form-element-standard' style={{ height: '48px' }} />
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
<FormItem
|
|
<FormItem
|
|
|
label='应用类型'
|
|
label='应用类型'
|
|
@@ -833,7 +865,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
>
|
|
>
|
|
|
<Select
|
|
<Select
|
|
|
className='form-element-select'
|
|
className='form-element-select'
|
|
|
- style={{ height: '48px'}}
|
|
|
|
|
|
|
+ style={{ height: '48px' }}
|
|
|
placeholder='请选择问答应用类型'
|
|
placeholder='请选择问答应用类型'
|
|
|
onChange={handleAppChange}
|
|
onChange={handleAppChange}
|
|
|
allowClear={true}
|
|
allowClear={true}
|
|
@@ -855,12 +887,28 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='appProId'
|
|
name='appProId'
|
|
|
rules={[{ required: true, message: '项目不能为空' }]}
|
|
rules={[{ required: true, message: '项目不能为空' }]}
|
|
|
>
|
|
>
|
|
|
- <Cascader
|
|
|
|
|
|
|
+ {/* <Cascader
|
|
|
options={appProjectList}
|
|
options={appProjectList}
|
|
|
placeholder="请选择项目"
|
|
placeholder="请选择项目"
|
|
|
showSearch
|
|
showSearch
|
|
|
className="form-element-select"
|
|
className="form-element-select"
|
|
|
- style={{ height: '48px'}}
|
|
|
|
|
|
|
+ style={{ height: '48px' }}
|
|
|
|
|
+ /> */}
|
|
|
|
|
+ <Select
|
|
|
|
|
+ showSearch
|
|
|
|
|
+ placeholder="请输入项目名称"
|
|
|
|
|
+ defaultActiveFirstOption={false}
|
|
|
|
|
+ filterOption={false}
|
|
|
|
|
+ className="form-element-select"
|
|
|
|
|
+ style={{ height: '48px' }}
|
|
|
|
|
+ notFoundContent={fetching ? <Spin size="small" /> : 'No results found'}
|
|
|
|
|
+ onSearch={(e) => {
|
|
|
|
|
+ projectApi.fetchProject(e);
|
|
|
|
|
+ }}
|
|
|
|
|
+ allowClear
|
|
|
|
|
+ onChange={(value) => {
|
|
|
|
|
+ }}
|
|
|
|
|
+ options={projectList}
|
|
|
/>
|
|
/>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
</>
|
|
</>
|
|
@@ -871,7 +919,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
>
|
|
>
|
|
|
<Select
|
|
<Select
|
|
|
className='form-element-select'
|
|
className='form-element-select'
|
|
|
- style={{ height: '48px'}}
|
|
|
|
|
|
|
+ style={{ height: '48px' }}
|
|
|
placeholder='请选择是否公开'
|
|
placeholder='请选择是否公开'
|
|
|
allowClear={true}
|
|
allowClear={true}
|
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
@@ -891,17 +939,17 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
label='显示顺序'
|
|
label='显示顺序'
|
|
|
name='sort'
|
|
name='sort'
|
|
|
>
|
|
>
|
|
|
- <InputNumber placeholder="请输入显示顺序" value={''} className='form-element-standard' style={{ height: '48px',lineHeight:'48px'}}/>
|
|
|
|
|
|
|
+ <InputNumber placeholder="请输入显示顺序" value={''} className='form-element-standard' style={{ height: '48px', lineHeight: '48px' }} />
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
{/* VIP用户 */}
|
|
{/* VIP用户 */}
|
|
|
- {visibleFlag==1&&<FormItem
|
|
|
|
|
|
|
+ {visibleFlag == 1 && <FormItem
|
|
|
label='指定用户'
|
|
label='指定用户'
|
|
|
>
|
|
>
|
|
|
<div className='tags-info'>
|
|
<div className='tags-info'>
|
|
|
<p className='tags-list'>
|
|
<p className='tags-list'>
|
|
|
{vipList.map((item: any) =>
|
|
{vipList.map((item: any) =>
|
|
|
- (<Tag key={item.userId} color="blue" closeIcon onClose={(e)=>{
|
|
|
|
|
- const newVipList = vipList.filter((vip:any) => vip.userId !== item.userId);
|
|
|
|
|
|
|
+ (<Tag key={item.userId} color="blue" closeIcon onClose={(e) => {
|
|
|
|
|
+ const newVipList = vipList.filter((vip: any) => vip.userId !== item.userId);
|
|
|
setVipList(newVipList);
|
|
setVipList(newVipList);
|
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
|
}}>
|
|
}}>
|
|
@@ -910,7 +958,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
)}
|
|
)}
|
|
|
</p>
|
|
</p>
|
|
|
<p>
|
|
<p>
|
|
|
- {vipList.length>0&&<CloseCircleOutlined className='cup' onClick={()=>{
|
|
|
|
|
|
|
+ {vipList.length > 0 && <CloseCircleOutlined className='cup' onClick={() => {
|
|
|
setVipList([]);
|
|
setVipList([]);
|
|
|
}} />}
|
|
}} />}
|
|
|
<Button style={{
|
|
<Button style={{
|
|
@@ -1159,7 +1207,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
// if (value === 'Qwen3-30B') {
|
|
// if (value === 'Qwen3-30B') {
|
|
|
// setIsDeepThinkVisible(false);
|
|
// setIsDeepThinkVisible(false);
|
|
|
// } else {
|
|
// } else {
|
|
|
- setIsDeepThinkVisible(false);
|
|
|
|
|
|
|
+ setIsDeepThinkVisible(false);
|
|
|
// }
|
|
// }
|
|
|
}}
|
|
}}
|
|
|
>
|
|
>
|