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
4dfd6782
Commit
4dfd6782
authored
Oct 30, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化系统设置板块
parent
7b10c512
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
158 deletions
+86
-158
base-manager-ui/admin/src/pages/basicset/system/parameter/Parameter.vue
...i/admin/src/pages/basicset/system/parameter/Parameter.vue
+34
-59
base-manager-ui/admin/src/pages/basicset/system/systemlogs/SystemLogs.vue
...admin/src/pages/basicset/system/systemlogs/SystemLogs.vue
+19
-37
base-manager-ui/admin/src/pages/basicset/system/task/TaskSet.vue
...nager-ui/admin/src/pages/basicset/system/task/TaskSet.vue
+33
-62
No files found.
base-manager-ui/admin/src/pages/basicset/system/parameter/Parameter.vue
View file @
4dfd6782
...
...
@@ -21,64 +21,55 @@
</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: 560 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:loading="loading"
bordered
:scroll="{ y: 590 }"
: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="getSystemParameterList"
>
<!-- 序号 -->
<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=
"validStatus"
slot-scope=
"
text
"
>
<a-tag>
{{
filterItems
(
text
.
validStatus
,
dict
.
validStatus
)
}}
</a-tag>
<template
slot=
"validStatus"
slot-scope=
"
{ record }
">
<a-tag>
{{
dict
.
validStatus
[
record
.
validStatus
]
}}
</a-tag>
</
template
>
<!-- 修改状态 -->
<
template
slot=
"modStatus"
slot-scope=
"
text
"
>
<a-tag>
{{
filterItems
(
text
.
modStatus
,
dict
.
modStatus
)
}}
</a-tag>
<
template
slot=
"modStatus"
slot-scope=
"
{ record }
"
>
<a-tag>
{{
dict
.
modStatus
[
record
.
modStatus
]
}}
</a-tag>
</
template
>
<!-- 展现类型 -->
<
template
slot=
"displayType"
slot-scope=
"
text
"
>
<
template
slot=
"displayType"
slot-scope=
"
{ record }
"
>
<!--
{{
text
.
displayType
||
"
--
"
}}
-->
<a-tag>
{{
filterItems
(
text
.
displayType
,
dict
.
displayType
)
}}
</a-tag>
<a-tag>
{{
dict
.
displayType
[
record
.
displayType
]
}}
</a-tag>
</
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
)"
@
click=
"handleEdit(
record
)"
>
编辑
</span
>
<span
href=
"javascript:;"
class=
"delete pointer"
@
click=
"handleDel(
text
.id)"
@
click=
"handleDel(
record
.id)"
>
删除
</span
>
</a-space>
</
template
>
</
a
-table>
</
y
-table>
</div>
<!-- 新增 -->
<AddParameter
...
...
@@ -95,9 +86,11 @@
import
{
getSystemParameterList
,
delSystemParameter
}
from
"
@/services/system
"
;
import
{
pageSizeOptions
}
from
"
@/config/pageConfig.js
"
;
import
AddParameter
from
"
./modal/AddParameter.vue
"
;
import
YTable
from
"
@/components/YTable.vue
"
;
export
default
{
components
:
{
AddParameter
,
YTable
,
},
data
()
{
const
columns
=
[
...
...
@@ -106,7 +99,7 @@ export default {
dataIndex
:
"
num
"
,
width
:
"
65px
"
,
scopedSlots
:
{
customRender
:
"
num
"
,
customRender
:
"
index
"
,
},
},
{
...
...
@@ -173,7 +166,7 @@ export default {
return
{
columns
,
loading
:
false
,
current
:
1
,
page
:
1
,
size
:
10
,
total
:
0
,
pageSizeOptions
,
...
...
@@ -196,7 +189,7 @@ export default {
async
getSystemParameterList
()
{
this
.
loading
=
true
;
let
res
=
await
getSystemParameterList
({
page
:
this
.
current
,
page
:
this
.
page
,
size
:
this
.
size
,
name
:
`%
${
this
.
searchForm
.
name
}
%`
,
});
...
...
@@ -204,8 +197,8 @@ export default {
if
(
res
.
data
.
code
==
1
)
{
let
{
total
,
data
,
dict
}
=
res
.
data
.
data
;
this
.
dict
=
dict
;
if
(
!
data
.
length
&&
this
.
current
>
1
)
{
this
.
current
-=
1
;
if
(
!
data
.
length
&&
this
.
page
>
1
)
{
this
.
page
-=
1
;
this
.
getSystemParameterList
();
}
this
.
total
=
total
;
...
...
@@ -220,26 +213,18 @@ export default {
},
// 搜索
onSearch
()
{
this
.
current
=
1
;
this
.
page
=
1
;
this
.
selectedRowKeys
=
[];
this
.
getSystemParameterList
();
},
// 重置搜索
resetSearch
()
{
this
.
current
=
1
;
this
.
page
=
1
;
this
.
selectedRowKeys
=
[];
Object
.
assign
(
this
.
searchForm
,
this
.
$options
.
data
().
searchForm
);
this
.
getSystemParameterList
();
},
// 分页
handleChange
(
num
)
{
this
.
current
=
num
;
this
.
getSystemParameterList
();
},
// 改变每页显示数量
showSizeChange
(
current
,
size
)
{
this
.
current
=
current
;
this
.
size
=
size
;
this
.
getSystemParameterList
();
},
// 选择
onSelectChange
(
keys
)
{
this
.
selectedRowKeys
=
keys
;
...
...
@@ -285,16 +270,6 @@ export default {
},
});
},
// 过滤表格数据
filterItems
(
key
,
dict
=
{})
{
let
val
=
""
;
Object
.
keys
(
dict
).
forEach
((
keys
)
=>
{
if
(
key
==
keys
)
{
val
=
dict
[
keys
];
}
});
return
val
;
},
},
};
</
script
>
...
...
base-manager-ui/admin/src/pages/basicset/system/systemlogs/SystemLogs.vue
View file @
4dfd6782
...
...
@@ -14,34 +14,24 @@
</div>
<!-- 表格 -->
<div
class=
"table-content"
>
<a-table
:loading=
"loading"
bordered
:scroll=
"
{ y: 590 }"
<y-table
: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"
:data=
"tableData"
:pageSize.sync=
"size"
:page.sync=
"page"
:total=
"total"
:loading=
"loading"
:scroll=
"
{ y: 560 }"
@changePagination="getSystemLogsList"
>
<!-- 序号 -->
<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=
"logDate"
slot-scope=
"
text
"
>
{{
text
.
logDate
|
dateFormat
}}
<template
slot=
"logDate"
slot-scope=
"
{ record }
">
{{
record
.
logDate
|
dateFormat
}}
</
template
>
</
a
-table>
</
y
-table>
</div>
</div>
</template>
...
...
@@ -49,13 +39,13 @@
<
script
>
import
{
getSystemLogsList
}
from
"
@/services/system
"
;
import
{
pageSizeOptions
}
from
"
@/config/pageConfig.js
"
;
import
YTable
from
"
@/components/YTable.vue
"
;
const
columns
=
[
{
title
:
"
序号
"
,
dataIndex
:
"
num
"
,
width
:
"
65px
"
,
scopedSlots
:
{
customRender
:
"
num
"
,
customRender
:
"
index
"
,
},
},
{
...
...
@@ -86,6 +76,9 @@ const columns = [
},
];
export
default
{
components
:
{
YTable
,
},
data
()
{
return
{
columns
,
...
...
@@ -122,17 +115,6 @@ export default {
this
.
current
=
1
;
this
.
getSystemLogsList
();
},
// 分页
handleChange
(
num
)
{
this
.
current
=
num
;
this
.
getSystemLogsList
();
},
// 改变每页显示数量
showSizeChange
(
current
,
size
)
{
this
.
current
=
current
;
this
.
size
=
size
;
this
.
getSystemLogsList
();
},
},
};
</
script
>
...
...
@@ -147,4 +129,4 @@ export default {
margin-bottom: 15px;
}
}
</
style
>
\ No newline at end of file
</
style
>
base-manager-ui/admin/src/pages/basicset/system/task/TaskSet.vue
View file @
4dfd6782
...
...
@@ -19,65 +19,54 @@
</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: 560 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:loading="loading"
bordered
:scroll="{ y: 590 }"
: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="getSystemTaskList"
>
<!-- 序号 -->
<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=
"excuteStrategy"
slot-scope=
"text"
>
<a-tag
>
{{
filterItems
(
text
.
excuteStrategy
,
dict
.
excuteStrategy
)
}}
</a-tag>
<template
slot=
"excuteStrategy"
slot-scope=
"
{ record }">
<a-tag>
{{
dict
.
excuteStrategy
[
record
.
excuteStrategy
]
}}
</a-tag>
</
template
>
<!-- 最后执行时间 -->
<
template
slot=
"lastExcuteTime"
slot-scope=
"
text
"
>
{{
text
.
lastExcuteTime
|
dateFormat
}}
<
template
slot=
"lastExcuteTime"
slot-scope=
"
{ record }
"
>
{{
record
.
lastExcuteTime
|
dateFormat
}}
</
template
>
<!-- 任务状态 -->
<
template
slot=
"status"
slot-scope=
"
text
"
>
<a-tag>
{{
filterItems
(
text
.
status
,
dict
.
status
)
}}
</a-tag>
<
template
slot=
"status"
slot-scope=
"
{ record }
"
>
<a-tag>
{{
dict
.
status
[
record
.
status
]
}}
</a-tag>
</
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
)"
@
click=
"handleEdit(
record
)"
>
编辑
</span
>
<span
href=
"javascript:;"
class=
"delete pointer"
@
click=
"handleDel(
text
.id)"
@
click=
"handleDel(
record
.id)"
>
删除
</span
>
</a-space>
</
template
>
</
a
-table>
</
y
-table>
</div>
<!-- 新增 -->
<AddTask
...
...
@@ -94,18 +83,19 @@
import
{
getSystemTaskList
,
delSystemTask
}
from
"
@/services/system
"
;
import
{
pageSizeOptions
}
from
"
@/config/pageConfig.js
"
;
import
AddTask
from
"
./modal/AddTask.vue
"
;
import
YTable
from
"
@/components/YTable.vue
"
;
export
default
{
components
:
{
AddTask
,
YTable
,
},
data
()
{
const
columns
=
[
{
title
:
"
序号
"
,
dataIndex
:
"
num
"
,
width
:
"
65px
"
,
scopedSlots
:
{
customRender
:
"
num
"
,
customRender
:
"
index
"
,
},
},
{
...
...
@@ -157,7 +147,7 @@ export default {
return
{
columns
,
loading
:
false
,
current
:
1
,
page
:
1
,
size
:
10
,
total
:
0
,
pageSizeOptions
,
...
...
@@ -177,7 +167,7 @@ export default {
async
getSystemTaskList
()
{
this
.
loading
=
true
;
let
res
=
await
getSystemTaskList
({
page
:
this
.
current
,
page
:
this
.
page
,
size
:
this
.
size
,
name
:
`%
${
this
.
searchValue
}
%`
,
});
...
...
@@ -185,8 +175,8 @@ export default {
if
(
res
.
data
.
code
==
1
)
{
let
{
total
,
data
,
dict
}
=
res
.
data
.
data
;
this
.
dict
=
dict
;
if
(
!
data
.
length
&&
this
.
current
>
1
)
{
this
.
current
-=
1
;
if
(
!
data
.
length
&&
this
.
page
>
1
)
{
this
.
page
-=
1
;
this
.
getSystemTaskList
();
}
this
.
total
=
total
;
...
...
@@ -201,20 +191,11 @@ export default {
},
// 搜索
onSearch
()
{
this
.
current
=
1
;
this
.
getSystemTaskList
();
},
// 分页
handleChange
(
num
)
{
this
.
current
=
num
;
this
.
getSystemTaskList
();
},
// 改变每页显示数量
showSizeChange
(
current
,
size
)
{
this
.
current
=
current
;
this
.
size
=
size
;
this
.
page
=
1
;
this
.
selectedRowKeys
=
[];
this
.
getSystemTaskList
();
},
// 选择
onSelectChange
(
keys
)
{
this
.
selectedRowKeys
=
keys
;
...
...
@@ -261,16 +242,6 @@ export default {
},
});
},
// 过滤表格数据
filterItems
(
key
,
dict
=
{})
{
let
val
=
""
;
Object
.
keys
(
dict
).
forEach
((
keys
)
=>
{
if
(
key
==
keys
)
{
val
=
dict
[
keys
];
}
});
return
val
;
},
},
};
</
script
>
...
...
@@ -280,4 +251,4 @@ export default {
width: 100%;
height: 100%;
}
</
style
>
\ No newline at end of file
</
style
>
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