Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tianjin
Project
Project
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
徐来柯
tianjin
Commits
d1ca6979
Commit
d1ca6979
authored
Jan 08, 2021
by
徐来柯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9c9828ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
76 deletions
+99
-76
MaterialWarehousingMoudle.vue
src/views/education/MaterialWarehousingMoudle.vue
+3
-76
Pagination.vue
src/views/education/component/Pagination.vue
+96
-0
No files found.
src/views/education/MaterialWarehousingMoudle.vue
View file @
d1ca6979
...
...
@@ -76,24 +76,7 @@
>
</el-table-column>
</el-table>
<div
class=
"page_bottom"
>
<div
class=
"bottom_text"
>
<span>
共
{{
totalCount
}}
条记录 当前第
{{
pageIndex
}}
页 共
{{
totalPage
}}
页 每页
{{
pageSize
}}
条记录
</span>
</div>
<div
class=
"bottom_btns"
>
<div
class=
"bottom_firest"
@
click=
"first"
>
首页
</div>
<div
ref=
"last"
:class=
"num
<
=
1
?
'
bottom_disabled
'
:
'
bottom_next
'"
@
click=
"last"
>
上一页
</div>
<div
ref=
"next"
:class=
"num === totalPage || num
<
=
0
?
'
bottom_disabled
'
:
'
bottom_next
'"
@
click=
"next"
>
下一页
</div>
<div
class=
"bottom_end"
@
click=
"end"
>
末页
</div>
<span>
第
</span>
<input
v-model=
"num"
class=
"text"
@
input=
"handleBlur"
type=
"text"
/>
<span>
页
</span>
<div
@
click=
"jump"
class=
"bottom_jump"
>
跳转
</div>
</div>
</div>
<Pagination
@
pageFun=
"pageFun"
/>
</div>
<store-dialog
:titleText=
"'物料入库单'"
v-if=
"popShow"
@
closeDialog=
"closeDialog"
@
conserve=
"conserve"
/>
<delete-pop
ref=
"delete"
:deletetext=
"deletetext"
:type=
"typeV"
v-if=
"deleteShow"
></delete-pop>
...
...
@@ -104,9 +87,10 @@
import
searchForm
from
'./component/searchForm'
import
storeDialog
from
'./component/storeDialog'
import
deletePop
from
'./component/deletePop'
import
Pagination
from
'./component/Pagination'
export
default
{
components
:
{
searchForm
,
storeDialog
,
deletePop
},
components
:
{
searchForm
,
storeDialog
,
deletePop
,
Pagination
},
data
()
{
return
{
tableData
:
[],
...
...
@@ -116,12 +100,6 @@ export default {
deletetext
:
''
,
deleteShow
:
false
,
typeV
:
''
,
num
:
1
,
// 首字母已改为小写
totalCount
:
1
,
pageIndex
:
1
,
totalPage
:
1
,
pageSize
:
50
,
}
},
methods
:
{
...
...
@@ -135,57 +113,6 @@ export default {
}
else
{
this
.
tableData
=
this
.
AllTableData
.
slice
((
num
-
1
)
*
this
.
pageSize
+
1
,
this
.
pageSize
*
num
)
}
},
//跳转
jump
(){
if
(
this
.
pageIndex
!=
this
.
num
){
if
(
this
.
num
>
this
.
totalPage
||
this
.
num
<
1
){
this
.
typeV
=
'3'
this
.
deleteShow
=
true
}
else
{
this
.
pageIndex
=
this
.
num
this
.
pageFun
(
this
.
pageIndex
)
}
}
},
// 首页
first
()
{
this
.
pageIndex
=
1
this
.
num
=
this
.
pageIndex
this
.
pageFun
(
this
.
pageIndex
)
console
.
log
(
'首页'
)
},
//末页
end
(){
this
.
pageIndex
=
this
.
totalPage
this
.
num
=
this
.
pageIndex
this
.
pageFun
(
this
.
pageIndex
)
console
.
log
(
'尾页'
)
},
//下一页
next
(){
if
(
this
.
pageIndex
<
this
.
totalPage
){
this
.
pageIndex
=
this
.
pageIndex
+
1
this
.
num
=
this
.
pageIndex
this
.
pageFun
(
this
.
pageIndex
)
console
.
log
(
'下一页'
)
}
},
//上一页
last
(){
if
(
this
.
pageIndex
>
1
){
this
.
pageIndex
=
this
.
pageIndex
-
1
this
.
num
=
this
.
pageIndex
this
.
pageFun
(
this
.
pageIndex
)
console
.
log
(
'上一页'
)
}
},
handleBlur
()
{
if
(
this
.
num
>
this
.
totalPage
)
{
this
.
num
=
this
.
totalPage
}
else
if
(
Number
(
this
.
num
<=
0
))
{
this
.
num
=
1
}
},
delData
()
{
if
(
this
.
checkList
.
length
===
0
)
{
...
...
src/views/education/component/Pagination.vue
0 → 100644
View file @
d1ca6979
<
template
>
<div
class=
"page_bottom"
>
<div
class=
"bottom_text"
>
<span>
共
{{
totalCount
}}
条记录 当前第
{{
pageIndex
}}
页 共
{{
totalPage
}}
页 每页
{{
pageSize
}}
条记录
</span>
</div>
<div
class=
"bottom_btns"
>
<div
class=
"bottom_firest"
@
click=
"first"
>
首页
</div>
<div
ref=
"last"
:class=
"num
<
=
1
?
'
bottom_disabled
'
:
'
bottom_next
'"
@
click=
"last"
>
上一页
</div>
<div
ref=
"next"
:class=
"num == totalPage || num
<
=
0
?
'
bottom_disabled
'
:
'
bottom_next
'"
@
click=
"next"
>
下一页
</div>
<div
class=
"bottom_end"
@
click=
"end"
>
末页
</div>
<span>
第
</span>
<input
v-model=
"num"
class=
"text"
@
input=
"handleInput"
@
blur=
"handleBlur"
type=
"text"
/>
<span>
页
</span>
<div
@
click=
"jump"
class=
"bottom_jump"
>
跳转
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
num
:
1
,
// 首字母已改为小写
totalCount
:
1
,
pageIndex
:
1
,
totalPage
:
1
,
pageSize
:
50
,
}
},
methods
:
{
// 分页方法
pageFun
(
num
){
this
.
$emit
(
'pageFun'
,
num
)
},
//跳转
jump
(){
if
(
this
.
pageIndex
!=
this
.
num
){
if
(
this
.
num
>
this
.
totalPage
||
this
.
num
<
1
){
this
.
typeV
=
'3'
this
.
deleteShow
=
true
}
else
{
this
.
pageIndex
=
this
.
num
this
.
pageFun
(
this
.
pageIndex
)
}
}
},
// 首页
first
()
{
this
.
pageIndex
=
1
this
.
num
=
this
.
pageIndex
this
.
pageFun
(
this
.
pageIndex
)
console
.
log
(
'首页'
)
},
//末页
end
(){
this
.
pageIndex
=
this
.
totalPage
this
.
num
=
this
.
pageIndex
this
.
pageFun
(
this
.
pageIndex
)
console
.
log
(
'尾页'
)
},
//下一页
next
(){
if
(
this
.
pageIndex
<
this
.
totalPage
){
this
.
pageIndex
=
this
.
pageIndex
+
1
this
.
num
=
this
.
pageIndex
this
.
pageFun
(
this
.
pageIndex
)
console
.
log
(
'下一页'
)
}
},
//上一页
last
(){
if
(
this
.
pageIndex
>
1
){
this
.
pageIndex
=
this
.
pageIndex
-
1
this
.
num
=
this
.
pageIndex
this
.
pageFun
(
this
.
pageIndex
)
console
.
log
(
'上一页'
)
}
},
handleInput
()
{
this
.
num
=
this
.
num
.
replace
(
/
[^\d]
/g
,
''
)
if
(
this
.
num
>
this
.
totalPage
)
{
this
.
num
=
this
.
totalPage
}
},
handleBlur
()
{
this
.
num
=
Number
(
this
.
num
)
if
(
Number
(
this
.
num
<=
0
))
{
this
.
num
=
1
}
}
}
}
</
script
>
\ No newline at end of file
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