mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-10 10:16:55 +08:00
feat: support export with filter
This commit is contained in:
@@ -8,8 +8,7 @@ export const professionalApi = {
|
||||
getOne: (id: any) => request.get(`/system/terminology/${id}`),
|
||||
enable: (id: any, enabled: any) => request.get(`/system/terminology/${id}/enable/${enabled}`),
|
||||
export2Excel: (params: any) =>
|
||||
request.get(`/system/terminology/export`, {
|
||||
params,
|
||||
request.get(`/system/terminology/export${params}`, {
|
||||
responseType: 'blob',
|
||||
requestOptions: { customError: true },
|
||||
}),
|
||||
|
||||
@@ -7,8 +7,7 @@ export const promptApi = {
|
||||
deleteEmbedded: (params: any) => request.delete('/system/custom_prompt', { data: params }),
|
||||
getOne: (id: any) => request.get(`/system/custom_prompt/${id}`),
|
||||
export2Excel: (type: any, params: any) =>
|
||||
request.get(`/system/custom_prompt/${type}/export`, {
|
||||
params,
|
||||
request.post(`/system/custom_prompt/${type}/export`, params, {
|
||||
responseType: 'blob',
|
||||
requestOptions: { customError: true },
|
||||
}),
|
||||
|
||||
@@ -8,8 +8,7 @@ export const trainingApi = {
|
||||
getOne: (id: any) => request.get(`/system/data-training/${id}`),
|
||||
enable: (id: any, enabled: any) => request.get(`/system/data-training/${id}/enable/${enabled}`),
|
||||
export2Excel: (params: any) =>
|
||||
request.get(`/system/data-training/export`, {
|
||||
params,
|
||||
request.get(`/system/data-training/export${params}`, {
|
||||
responseType: 'blob',
|
||||
requestOptions: { customError: true },
|
||||
}),
|
||||
|
||||
@@ -98,7 +98,7 @@ const exportExcel = () => {
|
||||
}).then(() => {
|
||||
searchLoading.value = true
|
||||
professionalApi
|
||||
.export2Excel(keywords.value ? { word: keywords.value } : {})
|
||||
.export2Excel(configParams())
|
||||
.then((res) => {
|
||||
const blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
|
||||
@@ -135,7 +135,7 @@ const exportExcel = () => {
|
||||
}).then(() => {
|
||||
searchLoading.value = true
|
||||
promptApi
|
||||
.export2Excel(currentType.value, keywords.value ? { name: keywords.value } : {})
|
||||
.export2Excel(currentType.value, configParams())
|
||||
.then((res) => {
|
||||
const blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
|
||||
@@ -99,7 +99,7 @@ const exportExcel = () => {
|
||||
}).then(() => {
|
||||
searchLoading.value = true
|
||||
trainingApi
|
||||
.export2Excel(keywords.value ? { question: keywords.value } : {})
|
||||
.export2Excel(configParams())
|
||||
.then((res) => {
|
||||
const blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
|
||||
Reference in New Issue
Block a user