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
0eb9e859
Commit
0eb9e859
authored
Oct 30, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化模块管理
parent
b840f6b9
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
205 deletions
+89
-205
base-manager-ui/admin/src/pages/basicset/deploy/components/StatementManage.vue
.../src/pages/basicset/deploy/components/StatementManage.vue
+34
-50
base-manager-ui/admin/src/pages/basicset/deploy/deploy.vue
base-manager-ui/admin/src/pages/basicset/deploy/deploy.vue
+55
-155
No files found.
base-manager-ui/admin/src/pages/basicset/deploy/components/StatementManage.vue
View file @
0eb9e859
...
...
@@ -26,54 +26,48 @@
</div>
<!-- 表格 -->
<div
class=
"table-content"
>
<a-table
<y-table
:columns=
"columns"
:data=
"tableData"
:pageSize.sync=
"size"
:page.sync=
"page"
:total=
"total"
:loading=
"loading"
:scroll=
"
{ y: 600 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:loading="loading"
bordered
:scroll="{ y: 460 }"
:columns="columns"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: handleChange,
onShowSizeChange: showSizeChange,
}"
:data-source="tableData"
:rowKey="(record) => record.id"
@changePagination="getStatementList"
>
<!-- 序号 -->
<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=
"censusType"
slot-scope=
"
text
"
>
{{
filterDict
(
text
.
censusType
)
}}
<template
slot=
"censusType"
slot-scope=
"
{ record }
">
{{
filterDict
(
record
.
censusType
)
}}
</
template
>
<!-- 是否开放 -->
<
template
slot=
"status"
slot-scope=
"
text
"
>
<a-tag
color=
"blue"
v-if=
"
text
.status === 1"
>
是
</a-tag>
<
template
slot=
"status"
slot-scope=
"
{ record }
"
>
<a-tag
color=
"blue"
v-if=
"
record
.status === 1"
>
是
</a-tag>
<a-tag
color=
"red"
v-else
>
否
</a-tag>
</
template
>
<!-- 操作 -->
<
template
slot=
"action"
slot-scope=
"
text
"
>
<
template
slot=
"action"
slot-scope=
"
{ record }
"
>
<a-space>
<a
href=
"javascript:;"
class=
"edit"
@
click=
"handleEdit(
text
)"
<a
href=
"javascript:;"
class=
"edit"
@
click=
"handleEdit(
record
)"
>
编辑
</a
>
<a
href=
"javascript:;"
class=
"delete"
@
click=
"handleDel(text.id)"
<a
href=
"javascript:;"
class=
"delete"
@
click=
"handleDel(record.id)"
>
删除
</a
>
</a-space>
</
template
>
</
a
-table>
</
y
-table>
</div>
<!-- 新增报表 -->
<AddStatement
...
...
@@ -90,14 +84,14 @@
<
script
>
import
{
getStatementList
,
delStatement
}
from
"
@/services/basicsetFun
"
;
import
AddStatement
from
"
../modal/AddStatement.vue
"
;
import
{
pageSizeOptions
}
from
"
@/config/pageConfig.js
"
;
import
YTable
from
"
@/components/YTable.vue
"
;
const
columns
=
[
{
title
:
"
序号
"
,
dataIndex
:
"
num
"
,
dataIndex
:
"
index
"
,
width
:
"
65px
"
,
scopedSlots
:
{
customRender
:
"
num
"
,
customRender
:
"
index
"
,
},
},
{
...
...
@@ -132,6 +126,7 @@ export default {
},
components
:
{
AddStatement
,
YTable
,
},
data
()
{
return
{
...
...
@@ -140,8 +135,7 @@ export default {
loading
:
false
,
total
:
0
,
size
:
10
,
current
:
1
,
pageSizeOptions
,
page
:
1
,
selectedRowKeys
:
[],
tableData
:
[],
addStatementVisile
:
false
,
...
...
@@ -170,7 +164,7 @@ export default {
async
getStatementList
()
{
this
.
loading
=
true
;
let
res
=
await
getStatementList
({
page
:
this
.
current
,
page
:
this
.
page
,
size
:
this
.
size
,
modelId
:
this
.
modelInfo
.
id
,
censusName
:
`%
${
this
.
censusName
}
%`
,
...
...
@@ -179,8 +173,8 @@ export default {
this
.
dict
=
dict
;
this
.
loading
=
false
;
if
(
code
==
1
)
{
if
(
!
data
.
length
&&
this
.
current
>
1
)
{
this
.
current
-=
1
;
if
(
!
data
.
length
&&
this
.
page
>
1
)
{
this
.
page
-=
1
;
this
.
getStatementList
();
}
this
.
tableData
=
data
.
data
;
...
...
@@ -207,7 +201,8 @@ export default {
},
// 搜索
onSearch
()
{
this
.
current
=
1
;
this
.
page
=
1
;
this
.
selectedRowKeys
=
[];
this
.
getStatementList
();
},
// 编辑
...
...
@@ -216,17 +211,6 @@ export default {
this
.
addStatementVisile
=
true
;
this
.
$refs
.
AddStatement
.
onEdit
(
row
,
this
.
modelInfo
);
},
// 翻页
handleChange
(
cur
)
{
this
.
current
=
cur
;
this
.
getStatementList
();
},
// 改变每页显示数量
showSizeChange
(
current
,
size
)
{
this
.
current
=
current
;
this
.
size
=
size
;
this
.
getStatementList
();
},
// 删除
handleDel
(
id
)
{
let
_this
=
this
;
...
...
@@ -244,6 +228,7 @@ export default {
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
_this
.
$message
.
success
(
msg
);
_this
.
selectedRowKeys
=
[];
_this
.
getStatementList
();
}
},
...
...
@@ -267,5 +252,4 @@ export default {
};
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
\ No newline at end of file
<
style
lang=
"less"
scoped
></
style
>
base-manager-ui/admin/src/pages/basicset/deploy/deploy.vue
View file @
0eb9e859
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