Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
cadb12e9
Commit
cadb12e9
authored
7 months ago
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 大厅管理优化
parent
0eb9e859
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
163 additions
and
232 deletions
+163
-232
base-manager-ui/admin/src/components/YTable.vue
base-manager-ui/admin/src/components/YTable.vue
+2
-1
base-manager-ui/admin/src/pages/basicset/hall/hallmanage/HallManage.vue
...i/admin/src/pages/basicset/hall/hallmanage/HallManage.vue
+27
-56
base-manager-ui/admin/src/pages/basicset/hall/hallwindow/HallWindow.vue
...i/admin/src/pages/basicset/hall/hallwindow/HallWindow.vue
+134
-175
No files found.
base-manager-ui/admin/src/components/YTable.vue
View file @
cadb12e9
...
...
@@ -37,6 +37,7 @@
</template>
<
script
>
import
{
pageSizeOptions
}
from
"
@/config/pageConfig.js
"
;
export
default
{
props
:
{
columns
:
{
...
...
@@ -90,7 +91,7 @@ export default {
},
pageSizeOptions
:
{
type
:
Array
,
default
:
()
=>
[
"
10
"
,
"
30
"
,
"
50
"
,
"
100
"
,
"
200
"
]
,
default
:
()
=>
pageSizeOptions
,
},
},
data
()
{
...
...
This diff is collapsed.
Click to expand it.
base-manager-ui/admin/src/pages/basicset/hall/hallmanage/HallManage.vue
View file @
cadb12e9
...
...
@@ -18,56 +18,39 @@
</div>
<!-- 表格 -->
<div
class=
"table-content"
>
<a-table
<y-table
:columns=
"columns"
:data=
"dataList"
:pageSize.sync=
"size"
:page.sync=
"page"
:total=
"total"
:loading=
"loading"
:scroll=
"
{ y: 580 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:loading="loading"
bordered
:scroll="{ y: 580 }"
:columns="columns"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: handleChange,
onShowSizeChange: showSizeChange,
}"
:data-source="dataList"
:rowKey="(record) => record.id"
@changePagination="getHallList"
>
<!-- 序号 -->
<span
slot=
"num"
slot-scope=
"text, record, index"
>
{{
(
current
-
1
)
*
size
+
index
+
1
<span
slot=
"index"
slot-scope=
"
{ index }">
{{
(
page
-
1
)
*
size
+
index
+
1
}}
</span>
<!-- 创建时间 -->
<template
slot=
"createTime"
slot-scope=
"
text
"
>
{{
text
.
createTime
|
dateFormat
}}
<template
slot=
"createTime"
slot-scope=
"
{ record }
">
{{
record
.
createTime
|
dateFormat
}}
</
template
>
<!-- 操作 -->
<
template
slot=
"action"
slot-scope=
"
text
"
>
<
template
slot=
"action"
slot-scope=
"
{ record }
"
>
<a-space
size=
"middle"
>
<span
href=
"javascript:;"
class=
"primary pointer"
@
click=
"handleEdit(text)"
<span
class=
"primary pointer"
@
click=
"handleEdit(record)"
>
编辑
</span
>
<span
href=
"javascript:;"
class=
"delete pointer"
@
click=
"handleDel(text.id)"
<span
class=
"delete pointer"
@
click=
"handleDel(record.id)"
>
删除
</span
>
</a-space>
</
template
>
</
a
-table>
</
y
-table>
</div>
<!-- 新增、修改大厅 -->
<AddHall
...
...
@@ -81,21 +64,22 @@
<
script
>
import
{
getHallList
,
delHall
}
from
"
@/services/hall
"
;
import
{
pageSizeOptions
}
from
"
@/config/pageConfig.js
"
;
import
loacl
from
"
@/utils/local
"
;
import
AddHall
from
"
./modal/AddHall.vue
"
;
import
YTable
from
"
@/components/YTable.vue
"
;
export
default
{
components
:
{
AddHall
,
YTable
,
},
data
()
{
const
columns
=
[
{
title
:
"
序号
"
,
dataIndex
:
"
num
"
,
dataIndex
:
"
index
"
,
width
:
"
65px
"
,
scopedSlots
:
{
customRender
:
"
num
"
,
customRender
:
"
index
"
,
},
},
{
...
...
@@ -144,11 +128,10 @@ export default {
title
:
"
新增大厅
"
,
visible
:
false
,
selectedRowKeys
:
[],
current
:
1
,
page
:
1
,
size
:
10
,
total
:
0
,
siteId
:
loacl
.
getLocal
(
"
siteId
"
),
pageSizeOptions
,
searchValue
:
""
,
// 搜索
dataList
:
[],
};
...
...
@@ -161,15 +144,15 @@ export default {
async
getHallList
()
{
this
.
loading
=
true
;
let
res
=
await
getHallList
({
page
:
this
.
current
,
page
:
this
.
page
,
size
:
this
.
size
,
hallName
:
`%
${
this
.
searchValue
}
%`
,
siteId
:
this
.
siteId
,
});
if
(
res
.
data
.
code
==
1
)
{
let
{
data
,
total
}
=
res
.
data
.
data
;
if
(
!
data
.
length
&&
this
.
current
>
1
)
{
this
.
current
-=
1
;
if
(
!
data
.
length
&&
this
.
page
>
1
)
{
this
.
page
-=
1
;
this
.
getHallList
();
}
this
.
total
=
total
;
...
...
@@ -185,7 +168,7 @@ export default {
},
// 搜索
onSearch
()
{
this
.
current
=
1
;
this
.
page
=
1
;
this
.
selectedRowKeys
=
[];
this
.
getHallList
();
},
...
...
@@ -233,20 +216,8 @@ export default {
},
});
},
// 翻页
handleChange
(
cur
)
{
this
.
current
=
cur
;
this
.
getHallList
();
},
// 改变每页显示数量
showSizeChange
(
cur
,
size
)
{
this
.
current
=
cur
;
this
.
size
=
size
;
this
.
getHallList
();
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
\ No newline at end of file
<
style
lang=
"less"
scoped
></
style
>
This diff is collapsed.
Click to expand it.
base-manager-ui/admin/src/pages/basicset/hall/hallwindow/HallWindow.vue
View file @
cadb12e9
This diff is collapsed.
Click to expand it.
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