Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2ebcb722
authored
Feb 14, 2023
by
xingyuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: style
parent
4a1a1ab2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
17 deletions
+37
-17
src/views/system/notice/index.vue
+37
-17
No files found.
src/views/system/notice/index.vue
View file @
2ebcb722
...
...
@@ -15,20 +15,22 @@
<el-button
type=
"primary"
@
click=
"getList"
>
Query
</el-button>
</el-form-item>
</el-form>
<div
style=
"width: 100%; height:
5
00px"
>
<div
style=
"width: 100%; height:
6
00px"
>
<el-auto-resizer>
<template
#
default=
"
{ height, width }">
<el-table-v2
:columns=
"columns"
:data=
"tableData"
:width=
"width"
:height=
"height"
fixed
/>
</
template
>
</el-auto-resizer>
<el-pagination
:current-page=
"queryParms.pageNo"
:page-size=
"queryParms.pageSize"
layout=
"total, prev, pager, next"
:total=
"tableTotal"
@
size-change=
"getList"
@
current-change=
"getList"
/>
<div
class=
"mt-2"
>
<el-pagination
:current-page=
"queryParms.pageNo"
:page-size=
"queryParms.pageSize"
layout=
"total, prev, pager, next"
:total=
"tableTotal"
@
size-change=
"getList"
@
current-change=
"getList"
/>
</div>
</div>
</ContentWrap>
</template>
...
...
@@ -37,6 +39,7 @@ import dayjs from 'dayjs'
import
{
Column
,
ElPagination
,
ElTableV2
,
TableV2FixedDir
}
from
'element-plus'
import
*
as
NoticeApi
from
'@/api/system/notice'
import
{
XTextButton
}
from
'@/components/XButton'
import
{
DictTag
}
from
'@/components/DictTag'
const
{
t
}
=
useI18n
()
// 国际化
const
columns
:
Column
<
any
>
[]
=
[
...
...
@@ -57,13 +60,19 @@ const columns: Column<any>[] = [
key
:
'type'
,
dataKey
:
'type'
,
title
:
'公告类型'
,
width
:
180
width
:
180
,
cellRenderer
:
({
cellData
:
type
})
=>
(
<
DictTag
type
=
{
DICT_TYPE
.
SYSTEM_NOTICE_TYPE
}
value
=
{
type
}
><
/DictTag
>
)
},
{
key
:
'status'
,
dataKey
:
'status'
,
title
:
t
(
'common.status'
),
width
:
180
width
:
180
,
cellRenderer
:
({
cellData
:
status
})
=>
(
<
DictTag
type
=
{
DICT_TYPE
.
COMMON_STATUS
}
value
=
{
status
}
><
/DictTag
>
)
},
{
key
:
'content'
,
...
...
@@ -85,15 +94,22 @@ const columns: Column<any>[] = [
key
:
'actionbtns'
,
dataKey
:
'actionbtns'
,
//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
title
:
'操作'
,
//显示在单元格表头的文本
width
:
8
0
,
//当前列的宽度,必须设置
width
:
16
0
,
//当前列的宽度,必须设置
fixed
:
TableV2FixedDir
.
RIGHT
,
//是否固定列
align
:
'center'
,
cellRenderer
:
({
cellData
:
id
})
=>
(
<
XTextButton
preIcon
=
"ep:delete"
title
=
{
t
(
'action.del'
)}
onClick
=
{
handleDelete
.
bind
(
this
,
id
)}
><
/XTextButton
>
<>
<
XTextButton
preIcon
=
"ep:delete"
title
=
{
t
(
'action.edit'
)}
onClick
=
{
handleUpdate
.
bind
(
this
,
id
)}
><
/XTextButton
>
<
XTextButton
preIcon
=
"ep:delete"
title
=
{
t
(
'action.del'
)}
onClick
=
{
handleDelete
.
bind
(
this
,
id
)}
><
/XTextButton
>
<
/
>
)
}
]
...
...
@@ -115,6 +131,10 @@ const getList = async () => {
tableTotal
.
value
=
res
.
total
}
const
handleUpdate
=
(
id
)
=>
{
console
.
info
(
id
)
}
const
handleDelete
=
(
id
)
=>
{
console
.
info
(
id
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment