|
|
@ -49,7 +49,22 @@ export function useTable() { |
|
|
|
const router: Router = useRouter() |
|
|
|
const router: Router = useRouter() |
|
|
|
const fileStore = useFileStore() |
|
|
|
const fileStore = useFileStore() |
|
|
|
|
|
|
|
|
|
|
|
const columns: TableColumns<any> = [ |
|
|
|
const variables = reactive({ |
|
|
|
|
|
|
|
columns: [], |
|
|
|
|
|
|
|
row: {}, |
|
|
|
|
|
|
|
tableData: [], |
|
|
|
|
|
|
|
breadList: [], |
|
|
|
|
|
|
|
id: ref(Number(router.currentRoute.value.params.id) || -1), |
|
|
|
|
|
|
|
page: ref(1), |
|
|
|
|
|
|
|
pageSize: ref(10), |
|
|
|
|
|
|
|
searchVal: ref(), |
|
|
|
|
|
|
|
totalPage: ref(1), |
|
|
|
|
|
|
|
folderShowRef: ref(false), |
|
|
|
|
|
|
|
uploadShowRef: ref(false) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const createColumns = (variables: any) => { |
|
|
|
|
|
|
|
variables.columns = [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: t('resource.udf.id'), |
|
|
|
title: t('resource.udf.id'), |
|
|
|
key: 'id', |
|
|
|
key: 'id', |
|
|
@ -120,6 +135,7 @@ export function useTable() { |
|
|
|
h( |
|
|
|
h( |
|
|
|
NButton, |
|
|
|
NButton, |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
tag: 'div', |
|
|
|
circle: true, |
|
|
|
circle: true, |
|
|
|
type: 'info', |
|
|
|
type: 'info', |
|
|
|
size: 'tiny', |
|
|
|
size: 'tiny', |
|
|
@ -142,6 +158,7 @@ export function useTable() { |
|
|
|
h( |
|
|
|
h( |
|
|
|
NButton, |
|
|
|
NButton, |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
tag: 'div', |
|
|
|
circle: true, |
|
|
|
circle: true, |
|
|
|
type: 'info', |
|
|
|
type: 'info', |
|
|
|
size: 'tiny', |
|
|
|
size: 'tiny', |
|
|
@ -172,6 +189,7 @@ export function useTable() { |
|
|
|
h( |
|
|
|
h( |
|
|
|
NButton, |
|
|
|
NButton, |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
tag: 'div', |
|
|
|
circle: true, |
|
|
|
circle: true, |
|
|
|
type: 'error', |
|
|
|
type: 'error', |
|
|
|
size: 'tiny' |
|
|
|
size: 'tiny' |
|
|
@ -190,21 +208,8 @@ export function useTable() { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] as TableColumns<any> |
|
|
|
|
|
|
|
} |
|
|
|
const variables = reactive({ |
|
|
|
|
|
|
|
columns, |
|
|
|
|
|
|
|
row: {}, |
|
|
|
|
|
|
|
tableData: [], |
|
|
|
|
|
|
|
breadList: [], |
|
|
|
|
|
|
|
id: ref(Number(router.currentRoute.value.params.id) || -1), |
|
|
|
|
|
|
|
page: ref(1), |
|
|
|
|
|
|
|
pageSize: ref(10), |
|
|
|
|
|
|
|
searchVal: ref(), |
|
|
|
|
|
|
|
totalPage: ref(1), |
|
|
|
|
|
|
|
folderShowRef: ref(false), |
|
|
|
|
|
|
|
uploadShowRef: ref(false) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getTableData = (params: IUdfResourceParam) => { |
|
|
|
const getTableData = (params: IUdfResourceParam) => { |
|
|
|
const { state } = useAsyncState( |
|
|
|
const { state } = useAsyncState( |
|
|
@ -272,6 +277,7 @@ export function useTable() { |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
variables, |
|
|
|
variables, |
|
|
|
|
|
|
|
createColumns, |
|
|
|
getTableData, |
|
|
|
getTableData, |
|
|
|
goUdfManage, |
|
|
|
goUdfManage, |
|
|
|
goBread |
|
|
|
goBread |
|
|
|