|
|
@ -1,6 +1,6 @@ |
|
|
import request from '@/utils/axios/index'; |
|
|
import request from '@/utils/axios/index'; |
|
|
import { AxiosPromise } from 'axios'; |
|
|
import { AxiosPromise } from 'axios'; |
|
|
import { matterPage,createDir,matterTreeList,matterInfo} from './type'; |
|
|
import { matterPage,createDir,matterTreeList,apptoken} from './type'; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取空间目录文件 |
|
|
* 获取空间目录文件 |
|
|
@ -11,7 +11,8 @@ export function getSpaceMatterList( uid:string,data?: matterPage): AxiosPromise< |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -26,7 +27,8 @@ export function doCreateSpaceDir(uid:string,data?: createDir){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -38,7 +40,8 @@ export function doCreateAiagent(uid:string,data?: {space:string,matter:string}){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -53,7 +56,8 @@ export function doAccessManage(uid:string,data?: any){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -68,7 +72,8 @@ export function doDelSpace(uid:string,data?: any){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -83,7 +88,8 @@ export function spaceMatterRename(uid:string,data?: any){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -99,7 +105,8 @@ export function doDelSpaceMatter(uid:string,data?: any){ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Identifier':uid, |
|
|
'Identifier':uid, |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -114,7 +121,8 @@ export function doAiTraining(_url:string,data?: any){ |
|
|
url: '/aibot'+_url, |
|
|
url: '/aibot'+_url, |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Content-Type': 'application/x-www-form-urlencoded' |
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
@ -138,7 +146,8 @@ export function doAiChat(_url:string,data: aiChatData,sig?:AbortSignal){ |
|
|
_url,{ |
|
|
_url,{ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Content-Type': 'application/json' |
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
signal:sig, |
|
|
signal:sig, |
|
|
body: JSON.stringify(data) |
|
|
body: JSON.stringify(data) |
|
|
@ -154,7 +163,8 @@ export function doAiWorkflow(_url:string,data: aiChatData){ |
|
|
_url,{ |
|
|
_url,{ |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { |
|
|
headers: { |
|
|
'Content-Type': 'application/json' |
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
}, |
|
|
}, |
|
|
body: JSON.stringify(data) |
|
|
body: JSON.stringify(data) |
|
|
} |
|
|
} |
|
|
@ -168,6 +178,10 @@ export function getAiChatList(data:any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/chat/list', |
|
|
url: '/aibot/chat/list', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -181,6 +195,10 @@ export function getAiChat(data: any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/chat', |
|
|
url: '/aibot/chat', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -194,6 +212,10 @@ export function delAiChat(data: any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/chat/del', |
|
|
url: '/aibot/chat/del', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -207,6 +229,10 @@ export function setAiChat(data: any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/chat/update', |
|
|
url: '/aibot/chat/update', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -232,6 +258,10 @@ export function newShareChat(data: any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/chat/share', |
|
|
url: '/aibot/chat/share', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -243,6 +273,10 @@ export function getAiagentList(data?: any){ |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/aibot/agent/list', |
|
|
url: '/aibot/agent/list', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-Type': 'application/json', |
|
|
|
|
|
'App-Api-Token': apptoken |
|
|
|
|
|
}, |
|
|
data: data |
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |