Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
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
TFMOM
TF-MOM-WEB
Commits
acece46d
Commit
acece46d
authored
Jan 23, 2024
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页待办删除分页(接口未使用分页)
parent
43236cd6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
my-task.vue
...ns/dee-task-center/src/views/home/compontents/my-task.vue
+36
-36
No files found.
applications/dee-task-center/src/views/home/compontents/my-task.vue
View file @
acece46d
...
@@ -28,10 +28,10 @@
...
@@ -28,10 +28,10 @@
</div>
</div>
</div>
</div>
</div>
</div>
<
div
v-if=
"!initShowFont"
class=
"more-bar"
>
<
!--
<div
v-if=
"!initShowFont"
class=
"more-bar"
>
--
>
<span
v-if=
"taskList.length
<
pagination
.
total
"
class=
"more"
@
click=
"getMoreTaskData"
>
加载更多
</span
>
<!--
<span
v-if=
"taskList.length
<
pagination
.
total
"
class=
"more"
@
click=
"getMoreTaskData"
>
加载更多
</span>
--
>
<span
v-else
>
已全部加载!
</span
>
<!--
<span>
已全部加载!
</span>
--
>
<
/div
>
<
!--
</div>
--
>
</el-scrollbar>
</el-scrollbar>
</div>
</div>
</
template
>
</
template
>
...
@@ -42,7 +42,7 @@ import { getTemps } from '@/api/workflow/userSettings.js'
...
@@ -42,7 +42,7 @@ import { getTemps } from '@/api/workflow/userSettings.js'
import
{
getAllApplication
}
from
'@/api/workflow/config'
import
{
getAllApplication
}
from
'@/api/workflow/config'
// import { getTaskCount } from '@/api/workspace.js'
// import { getTaskCount } from '@/api/workspace.js'
// import _get from 'lodash.get'
// import _get from 'lodash.get'
import
{
post
,
get
}
from
'@/utils/http'
import
{
get
}
from
'@/utils/http'
export
default
{
export
default
{
name
:
'MyTask'
,
name
:
'MyTask'
,
...
@@ -64,12 +64,12 @@ export default {
...
@@ -64,12 +64,12 @@ export default {
isShowMoreFont
:
true
,
isShowMoreFont
:
true
,
initShowFont
:
false
,
initShowFont
:
false
,
taskList
:
[],
taskList
:
[],
pagination
:
{
//
pagination: {
currentPage
:
1
,
//
currentPage: 1,
pageSize
:
10
,
//
pageSize: 10,
pageSizes
:
[
5
],
//
pageSizes: [5],
total
:
0
//
total: 0
},
//
},
search
:
''
,
search
:
''
,
pageCount
:
0
,
pageCount
:
0
,
clickNum
:
1
,
clickNum
:
1
,
...
@@ -232,40 +232,40 @@ export default {
...
@@ -232,40 +232,40 @@ export default {
// 获取待办任务列表
// 获取待办任务列表
getTasks
(
page
,
type
)
{
getTasks
(
page
,
type
)
{
this
.
getOthersTasks
(
type
)
this
.
getOthersTasks
(
type
)
const
params
=
{
//
const params = {
'page'
:
page
||
this
.
pagination
.
currentPage
,
//
'page': page || this.pagination.currentPage,
'size'
:
this
.
pagination
.
pageSize
//
'size': this.pagination.pageSize
}
//
}
params
.
assignee
=
localStorage
.
getItem
(
'userId'
)
//
params.assignee = localStorage.getItem('userId')
if
(
this
.
searchForm
.
receiveTimeRange
&&
this
.
searchForm
.
receiveTimeRange
.
length
)
{
//
if (this.searchForm.receiveTimeRange && this.searchForm.receiveTimeRange.length) {
params
.
receiveTime1
=
this
.
searchForm
.
receiveTimeRange
[
0
]
+
' 00:00:00'
//
params.receiveTime1 = this.searchForm.receiveTimeRange[0] + ' 00:00:00'
params
.
receiveTime2
=
this
.
searchForm
.
receiveTimeRange
[
1
]
+
' 23:59:59'
//
params.receiveTime2 = this.searchForm.receiveTimeRange[1] + ' 23:59:59'
}
//
}
this
.
type
=
type
this
.
type
=
type
if
(
type
===
'单个签审'
)
{
if
(
type
===
'单个签审'
)
{
get
(
'/indexTask/task/todoStatistics'
).
then
(
res
=>
{
get
(
'/indexTask/task/todoStatistics'
).
then
(
res
=>
{
if
(
params
.
page
===
1
)
{
//
if (params.page === 1) {
this
.
taskList
=
[]
//
this.taskList = []
}
//
}
this
.
addData
(
res
.
items
,
res
.
items
.
length
)
this
.
addData
(
res
.
items
,
res
.
items
.
length
)
})
})
}
}
if
(
type
===
'已办任务'
)
{
if
(
type
===
'已办任务'
)
{
get
(
'/indexTask/task/finishStatistics'
).
then
(
res
=>
{
get
(
'/indexTask/task/finishStatistics'
).
then
(
res
=>
{
if
(
params
.
page
===
1
)
{
//
if (params.page === 1) {
this
.
taskList
=
[]
//
this.taskList = []
}
//
}
this
.
addData
(
res
.
items
,
res
.
items
.
length
)
this
.
addData
(
res
.
items
,
res
.
items
.
length
)
})
})
}
}
if
(
type
===
'我的请求'
)
{
//
if (type === '我的请求') {
post
(
`/workflow/inst?page=
${
params
.
page
}
&size=
${
params
.
size
}
`
,
{
'startedUserId'
:
localStorage
.
getItem
(
'userId'
),
'checkOwnerSignAddFlag'
:
true
}).
then
(
res
=>
{
//
post(`/workflow/inst?page=${params.page}&size=${params.size}`, { 'startedUserId': localStorage.getItem('userId'), 'checkOwnerSignAddFlag': true }).then(res => {
if
(
params
.
page
===
1
)
{
//
if (params.page === 1) {
this
.
taskList
=
[]
//
this.taskList = []
}
//
}
this
.
addData
(
res
.
items
.
content
,
res
.
items
.
totalElements
)
//
this.addData(res.items.content, res.items.totalElements)
})
//
})
}
//
}
},
},
addData
(
data
,
totalElements
)
{
addData
(
data
,
totalElements
)
{
data
.
forEach
((
item
)
=>
{
data
.
forEach
((
item
)
=>
{
...
@@ -275,7 +275,7 @@ export default {
...
@@ -275,7 +275,7 @@ export default {
})
})
}
}
})
})
this
.
pagination
.
total
=
totalElements
//
this.pagination.total = totalElements
},
},
showIcon
(
row
)
{
showIcon
(
row
)
{
return
showIcon
(
row
)
return
showIcon
(
row
)
...
@@ -361,7 +361,7 @@ export default {
...
@@ -361,7 +361,7 @@ export default {
},
},
getMoreTaskData
()
{
getMoreTaskData
()
{
if
(
this
.
clickNum
!==
this
.
pageCount
)
{
if
(
this
.
clickNum
!==
this
.
pageCount
)
{
this
.
pagination
.
currentPage
+=
1
//
this.pagination.currentPage += 1
this
.
getTasks
(
this
.
pagination
.
currentPage
,
this
.
type
)
this
.
getTasks
(
this
.
pagination
.
currentPage
,
this
.
type
)
this
.
clickNum
+=
1
this
.
clickNum
+=
1
}
}
...
...
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