|
|
|
@ -49,7 +49,22 @@ export function useTable() {
|
|
|
|
|
const router: Router = useRouter() |
|
|
|
|
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'), |
|
|
|
|
key: 'id', |
|
|
|
@ -120,6 +135,7 @@ export function useTable() {
|
|
|
|
|
h( |
|
|
|
|
NButton, |
|
|
|
|
{ |
|
|
|
|
tag: 'div', |
|
|
|
|
circle: true, |
|
|
|
|
type: 'info', |
|
|
|
|
size: 'tiny', |
|
|
|
@ -142,6 +158,7 @@ export function useTable() {
|
|
|
|
|
h( |
|
|
|
|
NButton, |
|
|
|
|
{ |
|
|
|
|
tag: 'div', |
|
|
|
|
circle: true, |
|
|
|
|
type: 'info', |
|
|
|
|
size: 'tiny', |
|
|
|
@ -172,6 +189,7 @@ export function useTable() {
|
|
|
|
|
h( |
|
|
|
|
NButton, |
|
|
|
|
{ |
|
|
|
|
tag: 'div', |
|
|
|
|
circle: true, |
|
|
|
|
type: 'error', |
|
|
|
|
size: 'tiny' |
|
|
|
@ -190,21 +208,8 @@ export function useTable() {
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
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) |
|
|
|
|
}) |
|
|
|
|
] as TableColumns<any> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const getTableData = (params: IUdfResourceParam) => { |
|
|
|
|
const { state } = useAsyncState( |
|
|
|
@ -272,6 +277,7 @@ export function useTable() {
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
variables, |
|
|
|
|
createColumns, |
|
|
|
|
getTableData, |
|
|
|
|
goUdfManage, |
|
|
|
|
goBread |
|
|
|
|