diff --git a/src/api/doc/space.ts b/src/api/doc/space.ts index 2013476..45a52ef 100644 --- a/src/api/doc/space.ts +++ b/src/api/doc/space.ts @@ -160,6 +160,34 @@ export function doAiWorkflow(_url:string,data: aiChatData){ } ) } + +/** + * 设置queryURLS + */ +export function setAgentQueryURL(_url:string,data: {urls:string}){ + return request({ + url: _url, + method: 'post', + headers: { + 'Content-Type': 'application/json' + }, + data: JSON.stringify(data) + } + ) +} + +/** + * 查询queryURLS + */ +export function getAgentQueryURL(uuid:string){ + return request( + { + url: `/aibot/agents/${uuid}/query/urls`, + method: 'get', + } + ) +} + /** * 通过userid获取记录列表 * @requires userid @@ -211,6 +239,7 @@ export function setAiChat(data: any){ }); } + /** * 获取智能体 */ diff --git a/src/api/doc/type.ts b/src/api/doc/type.ts index fe4c785..aa1f1ba 100644 --- a/src/api/doc/type.ts +++ b/src/api/doc/type.ts @@ -103,13 +103,33 @@ export function doFileUpload(params:FormData,_url:string): AxiosPromise { +export function logUploadError(params:{content:string}): AxiosPromise { return request({ - url: _url, + url: '/hxpan/api/matter/uploadlog', method: 'post', data: params, headers: { 'Content-Type': 'multipart/form-data' } }); +} + + +export interface ErrUploadLog{ + ID:number; + CreatedAt :string; + content:string; +} +/** + * 获取上传错误日志 + */ +export function getUploadErrList( uid:string): AxiosPromise { + return request({ + url: '/hxpan/api/matter/logs', + method: 'post', + headers: { + 'Identifier':uid, + 'Content-Type': 'multipart/form-data' + }, + }); } \ No newline at end of file diff --git a/src/components/DesignForm/public/form/aiassist.vue b/src/components/DesignForm/public/form/aiassist.vue index de08fff..0a0224b 100644 --- a/src/components/DesignForm/public/form/aiassist.vue +++ b/src/components/DesignForm/public/form/aiassist.vue @@ -39,7 +39,7 @@ defineExpose({onSendParamToAI}) async function onSendParamToAI(arr:Array<{ uuids: string[]; params: { [key: string]: any } }>){ interact_msg.value=[] for (let ele of arr){ - interact_msg.value.unshift({ask:true,think:"", content:"AI正在分析。。。"}) + //interact_msg.value.unshift({ask:true,think:"", content:"AI正在分析。。。"}) for (let uid of ele.uuids){ await doRequest(userid,uid,ele.params) } diff --git a/src/components/DesignForm/public/form/form.vue b/src/components/DesignForm/public/form/form.vue index 8950b06..f8cd77a 100644 --- a/src/components/DesignForm/public/form/form.vue +++ b/src/components/DesignForm/public/form/form.vue @@ -2445,6 +2445,7 @@ const webPage = computed({ return newVal; }, }); +// diff --git a/src/views/doc/manage.vue b/src/views/doc/manage.vue index 614ede2..ef9f117 100644 --- a/src/views/doc/manage.vue +++ b/src/views/doc/manage.vue @@ -25,8 +25,9 @@ import uploadlog from './uploadlog.vue'; import space from './space.vue'; import spacePermission from './spacePermission.vue'; import SvgIcon from "@/components/SvgIcon/index.vue"; -import {doDelSpace,doAccessManage,doCreateAiagent} from "@/api/doc/space" +import {doDelSpace,doAccessManage,doCreateAiagent,setAgentQueryURL,getAgentQueryURL} from "@/api/doc/space" import Space from "./space.vue"; +import Logpanel from "./logpanel.vue"; //TODO: add file icons done! //TODO: click on table-item, 1)preview on file ..................... @@ -77,6 +78,8 @@ const modRecycling=ref(false) const percentage=ref(0) const onprogress=ref(false) const tabName = ref('main') +const logTableRef = ref() //上传日志页面的引用 + const Departs = computed(() => { return `${'p0'+userStore.userInfoCont.userId},${userStore.userInfoCont.company},${userStore.userInfoCont.department},${userStore.userInfoCont.organization}` @@ -312,16 +315,12 @@ function showRecycling(){ //获取上传日志 function showlogs(){ - modRecycling.value=true currentNode.value={} //清空当前节点 if(!PRIVATESPACE.value) { //共享空间模式要切换到个人空间 PRIVATESPACE.value=true } - getRecyclingList(uid,{}).then((resp)=>{ - paginInfo.value={total:1,page:0} - matterList.value=resp.data - }) + logTableRef.value.loadLogList() } //恢复删除文件 @@ -858,6 +857,38 @@ function onAiAgent(row:matterInfo){ }) } +//设置智能体联网查询地址 +async function onAgentQueryURL(row:matterInfo){ + await getAgentQueryURL(row.uuid).then(resp=>{ + const newurls=ref(resp.data) + ElMessageBox({ + title:"填入网址(多个网址必须逗号分隔)", + customStyle: { '--el-messagebox-width':'630px',padding:'13px'}, + confirmButtonText: "确定", + cancelButtonText: "取消", + message: () => h(ElInput, { + type:"textarea", + rows:3, + style: { width:'600px' }, + modelValue: newurls.value, + 'onUpdate:modelValue': (val) => { + newurls.value = val + }, + }), + }).then(() => { + setAgentQueryURL(row.uuid,{ + urls:newurls.value + }).then(()=>{ + ElMessage({ + message: '已成功更新URL', + type: 'success', + plain: true, + }) + }) + }) + }) +} + //------------------------------------------------------ //http://172.20.2.87:6010/api/alien/preview/5a10aaf6-396e-4d9a-7e87-3c5c8029d4db/123.png?ir=fill_100_100 //渲染完页面再执行 @@ -929,7 +960,7 @@ const handleSelectionChange = (val:matterInfo[]) => {
共享空间 - +
{ 成员管理 权限管理 创建智能体 + 联网查询 删除 重命名 @@ -959,7 +991,7 @@ const handleSelectionChange = (val:matterInfo[]) => { -
+
上传日志
@@ -1105,7 +1137,7 @@ const handleSelectionChange = (val:matterInfo[]) => {
- Comming soon.... + diff --git a/src/views/doc/showtext.vue b/src/views/doc/showtext.vue index f0f38c3..1adef15 100644 --- a/src/views/doc/showtext.vue +++ b/src/views/doc/showtext.vue @@ -1,7 +1,7 @@