Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DC-TOM
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘照晖
DC-TOM
Commits
a3f31c64
Commit
a3f31c64
authored
May 28, 2025
by
liuyangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分页问题修改
parent
ef68a0a1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
35 deletions
+43
-35
index.vue
src/components/CommonTable/index.vue
+9
-3
AboutView.vue
src/views/AboutView/AboutView.vue
+13
-21
collectorList.vue
src/views/collectorList/collectorList.vue
+16
-11
suspendManagement.vue
...uipmentManagement/suspendManagement/suspendManagement.vue
+5
-0
No files found.
src/components/CommonTable/index.vue
View file @
a3f31c64
...
...
@@ -93,7 +93,7 @@ const props = defineProps({
align
:
{
type
:
String
,
default
:
"left"
,
}
}
,
});
const
emit
=
defineEmits
([
...
...
@@ -148,7 +148,7 @@ const total = computed(() => props.total);
// 当前页数据
const
currentPageData
=
computed
(()
=>
{
if
(
!
props
.
showPagination
)
return
props
.
data
;
if
(
props
.
showPagination
)
return
props
.
data
;
const
start
=
(
currentPage
.
value
-
1
)
*
pageSize
.
value
;
const
end
=
start
+
pageSize
.
value
;
return
props
.
data
.
slice
(
start
,
end
);
...
...
@@ -178,11 +178,17 @@ const emitPaginationChange = () => {
emit
(
"update:page-size"
,
pageSize
.
value
);
};
const
setCurrentPage
=
()
=>
{
currentPage
.
value
=
1
;
};
defineExpose
({
setCurrentPage
})
// 监听数据变化,重置分页
watch
(
()
=>
props
.
data
,
()
=>
{
currentPage
.
value
=
1
;
//
currentPage.value = 1;
},
{
deep
:
true
}
);
...
...
src/views/AboutView/AboutView.vue
View file @
a3f31c64
...
...
@@ -74,10 +74,11 @@
</div>
<div
class=
"table-box"
>
<common-table
ref=
"pageRef"
:data=
"tableData.list"
:columns=
"tableColumns"
:total=
"total"
:default-page-size=
"
pageSize
"
:default-page-size=
"
20
"
@
pagination-change=
"handlePaginationChange"
:pagination-texts=
"
{
total: '共',
...
...
@@ -167,7 +168,7 @@ const tableColumns = ref([
{
prop
:
"index"
,
label
:
"序号"
,
width
:
"
5
%"
,
width
:
"
4
%"
,
},
{
prop
:
"eventName"
,
...
...
@@ -177,22 +178,22 @@ const tableColumns = ref([
{
prop
:
"name"
,
label
:
"发生位置"
,
width
:
"
9
%"
,
width
:
"
15
%"
,
},
{
prop
:
"deviceType"
,
label
:
"设备类型"
,
width
:
"
9
%"
,
width
:
"
7
%"
,
},
{
prop
:
"alarmIndicators"
,
label
:
"告警指标"
,
width
:
"
9
%"
,
width
:
"
7
%"
,
},
{
prop
:
"value"
,
label
:
"监测值"
,
width
:
"
9
%"
,
width
:
"
5
%"
,
},
{
prop
:
"eventTime"
,
...
...
@@ -202,7 +203,7 @@ const tableColumns = ref([
{
prop
:
"isSuspendAlarm"
,
label
:
"是否挂起期间告警"
,
width
:
"
9
%"
,
width
:
"
8
%"
,
},
{
prop
:
"operate"
,
...
...
@@ -212,20 +213,7 @@ const tableColumns = ref([
]);
const
tableData
=
reactive
({
list
:
[
{
deviceName
:
"1#除尘器"
,
compart
:
"1234567890"
,
position
:
"转炉"
,
changeDateRemind
:
"xx"
,
changeDate
:
"xx"
,
changePeo
:
"xx"
,
ownerdeviceName
:
"xx"
,
lastAlarmTime
:
"xx"
,
changeRound
:
"xx"
,
operate
:
"挂起"
,
},
],
list
:
[],
});
const
typeList
=
reactive
({
...
...
@@ -251,9 +239,12 @@ const handlePaginationChange = (pagination) => {
};
const
onSubmit
=
()
=>
{
currentPage
.
value
=
1
;
pageRef
.
value
.
setCurrentPage
(
currentPage
.
value
);
getAlarmList
();
};
const
pageRef
=
ref
(
null
);
const
onReset
=
()
=>
{
formInline
.
value
=
{
eventName
:
""
,
...
...
@@ -265,6 +256,7 @@ const onReset = () => {
};
currentPage
.
value
=
1
;
pageSize
.
value
=
20
;
pageRef
.
value
.
setCurrentPage
(
currentPage
.
value
);
getAlarmList
();
};
...
...
src/views/collectorList/collectorList.vue
View file @
a3f31c64
...
...
@@ -48,6 +48,7 @@
</div>
<div
class=
"table-box"
>
<common-table
ref=
"pageRef"
:data=
"tableData.list"
:columns=
"tableColumns"
:default-page-size=
"20"
...
...
@@ -184,17 +185,17 @@ const tableColumns = ref([
const
tableData
=
reactive
({
list
:
[
{
deviceName
:
"1#除尘器"
,
compart
:
"1234567890"
,
position
:
"转炉"
,
changeDateRemind
:
"xx"
,
changeDate
:
"xx"
,
changePeo
:
"xx"
,
ownerdeviceName
:
"xx"
,
lastAlarmTime
:
"xx"
,
changeRound
:
"xx"
,
},
//
{
//
deviceName: "1#除尘器",
//
compart: "1234567890",
//
position: "转炉",
//
changeDateRemind: "xx",
//
changeDate: "xx",
//
changePeo: "xx",
//
ownerdeviceName: "xx",
//
lastAlarmTime: "xx",
//
changeRound: "xx",
//
},
],
});
...
...
@@ -246,9 +247,12 @@ const handlePaginationChange = (pagination) => {
};
const
onSubmit
=
()
=>
{
currentPage
.
value
=
1
;
pageRef
.
value
.
setCurrentPage
(
currentPage
.
value
);
getAllDustList
();
};
const
pageRef
=
ref
(
null
);
const
onReset
=
()
=>
{
formInline
.
value
=
{
compart
:
""
,
...
...
@@ -257,6 +261,7 @@ const onReset = () => {
};
currentPage
.
value
=
1
;
pageSize
.
value
=
20
;
pageRef
.
value
.
setCurrentPage
(
currentPage
.
value
);
getAllDustList
();
};
...
...
src/views/equipmentManagement/suspendManagement/suspendManagement.vue
View file @
a3f31c64
...
...
@@ -46,6 +46,7 @@
</div>
<div
class=
"table-box"
>
<common-table
ref=
"pageRef"
:data=
"tableData.list"
:columns=
"tableColumns"
:default-page-size=
"20"
...
...
@@ -229,9 +230,12 @@ const handlePaginationChange = (pagination) => {
};
const
onSubmit
=
()
=>
{
currentPage
.
value
=
1
;
pageRef
.
value
.
setCurrentPage
(
1
);
getManagementList
();
};
const
pageRef
=
ref
(
null
);
const
onReset
=
()
=>
{
formInline
.
value
=
{
deviceType
:
""
,
...
...
@@ -240,6 +244,7 @@ const onReset = () => {
};
currentPage
.
value
=
1
;
pageSize
.
value
=
20
;
pageRef
.
value
.
setCurrentPage
(
currentPage
.
value
);
getManagementList
();
};
...
...
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