@ -21,12 +21,12 @@ import { useAsyncState } from '@vueuse/core'
import { queryProjectListPaging } from '@/service/modules/projects'
import { queryProjectListPaging } from '@/service/modules/projects'
import { parseISO , format } from 'date-fns'
import { parseISO , format } from 'date-fns'
import { useRouter } from 'vue-router'
import { useRouter } from 'vue-router'
import { useMenuStore } from '@/store/menu/menu'
import { NEllipsis } from 'naive-ui'
import TableAction from './components/table-action'
import TableAction from './components/table-action'
import styles from './index.module.scss'
import type { Router } from 'vue-router'
import type { Router } from 'vue-router'
import type { TableColumns } from 'naive-ui/es/data-table/src/interface'
import type { TableColumns } from 'naive-ui/es/data-table/src/interface'
import type { ProjectRes } from '@/service/modules/projects/types'
import type { ProjectRes } from '@/service/modules/projects/types'
import { useMenuStore } from '@/store/menu/menu'
export function useTable (
export function useTable (
updateProjectItem = (
updateProjectItem = (
@ -46,10 +46,14 @@ export function useTable(
title : t ( 'project.list.project_name' ) ,
title : t ( 'project.list.project_name' ) ,
key : 'name' ,
key : 'name' ,
render : ( row ) = >
render : ( row ) = >
h (
NEllipsis ,
{ style : 'max-width: 200px; color: #2080f0' } ,
{
default : ( ) = >
h (
h (
'a' ,
'a' ,
{
{
class : styles . links ,
onClick : ( ) = > {
onClick : ( ) = > {
menuStore . setProjectCode ( row . code )
menuStore . setProjectCode ( row . code )
router . push ( { path : ` /projects/ ${ row . code } ` } )
router . push ( { path : ` /projects/ ${ row . code } ` } )
@ -60,6 +64,9 @@ export function useTable(
return row . name
return row . name
}
}
}
}
) ,
tooltip : ( ) = > row . name
}
)
)
} ,
} ,
{ title : t ( 'project.list.owned_users' ) , key : 'userName' } ,
{ title : t ( 'project.list.owned_users' ) , key : 'userName' } ,