Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
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
hooloo
web
soss
Commits
a12e2740
Commit
a12e2740
authored
Sep 26, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改机器详情-组件管理分页
parent
825799f5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
src/api/machine/machineDetails.js
+2
-2
src/views/machine/machineDetails/machineDetailsCom.vue
+27
-3
No files found.
src/api/machine/machineDetails.js
View file @
a12e2740
...
...
@@ -26,9 +26,9 @@ export function getMachineComLog(id) {
}
// 机器组件
export
function
getComponentList
(
id
)
{
export
function
getComponentList
(
id
,
page
,
limit
)
{
return
request
({
url
:
"/v1/machine/component?machine_id="
+
id
,
url
:
"/v1/machine/component?machine_id="
+
id
+
"&page="
+
page
+
"&limit="
+
limit
,
method
:
"get"
,
});
}
...
...
src/views/machine/machineDetails/machineDetailsCom.vue
View file @
a12e2740
...
...
@@ -16,6 +16,15 @@
</
template
>
</el-table-column>
</el-table>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10, 20, 30, 40, 50]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</el-tab-pane>
</el-tabs>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -53,7 +62,11 @@ export default {
ros_code
:
""
,
component_name
:
""
,
materialId
:
""
,
machineState
:
null
machineState
:
null
,
// 总条数
total
:
0
,
currentPage
:
1
,
pageSize
:
10
};
},
created
()
{
...
...
@@ -70,11 +83,22 @@ export default {
this
.
machineState
=
row
.
state
this
.
getComponentList
();
},
handleSizeChange
(
val
){
this
.
currentPage
=
1
;
this
.
pageSize
=
val
;
this
.
getComponentList
();
},
handleCurrentChange
(
val
){
this
.
currentPage
=
val
;
//this.pageSize=1;
this
.
getComponentList
();
},
getComponentList
(){
this
.
loading
=
true
;
getComponentList
(
this
.
machineId
).
then
((
response
)
=>
{
getComponentList
(
this
.
machineId
,
this
.
currentPage
,
this
.
pageSize
).
then
((
response
)
=>
{
if
(
response
.
code
==
0
){
this
.
componentList
=
response
.
data
;
this
.
componentList
=
response
.
data
.
data
;
this
.
total
=
response
.
data
.
count
;
this
.
loading
=
false
;
}
});
...
...
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