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
Hide 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 @@
</div>
</div>
</div>
<
div
v-if=
"!initShowFont"
class=
"more-bar"
>
<span
v-if=
"taskList.length
<
pagination
.
total
"
class=
"more"
@
click=
"getMoreTaskData"
>
加载更多
</span
>
<span
v-else
>
已全部加载!
</span
>
<
/div
>
<
!--
<div
v-if=
"!initShowFont"
class=
"more-bar"
>
--
>
<!--
<span
v-if=
"taskList.length
<
pagination
.
total
"
class=
"more"
@
click=
"getMoreTaskData"
>
加载更多
</span>
--
>
<!--
<span>
已全部加载!
</span>
--
>
<
!--
</div>
--
>
</el-scrollbar>
</div>
</
template
>
...
...
@@ -42,7 +42,7 @@ import { getTemps } from '@/api/workflow/userSettings.js'
import
{
getAllApplication
}
from
'@/api/workflow/config'
// import { getTaskCount } from '@/api/workspace.js'
// import _get from 'lodash.get'
import
{
post
,
get
}
from
'@/utils/http'
import
{
get
}
from
'@/utils/http'
export
default
{
name
:
'MyTask'
,
...
...
@@ -64,12 +64,12 @@ export default {
isShowMoreFont
:
true
,
initShowFont
:
false
,
taskList
:
[],
pagination
:
{
currentPage
:
1
,
pageSize
:
10
,
pageSizes
:
[
5
],
total
:
0
},
//
pagination: {
//
currentPage: 1,
//
pageSize: 10,
//
pageSizes: [5],
//
total: 0
//
},
search
:
''
,
pageCount
:
0
,
clickNum
:
1
,
...
...
@@ -232,40 +232,40 @@ export default {
// 获取待办任务列表
getTasks
(
page
,
type
)
{
this
.
getOthersTasks
(
type
)
const
params
=
{
'page'
:
page
||
this
.
pagination
.
currentPage
,
'size'
:
this
.
pagination
.
pageSize
}
params
.
assignee
=
localStorage
.
getItem
(
'userId'
)
if
(
this
.
searchForm
.
receiveTimeRange
&&
this
.
searchForm
.
receiveTimeRange
.
length
)
{
params
.
receiveTime1
=
this
.
searchForm
.
receiveTimeRange
[
0
]
+
' 00:00:00'
params
.
receiveTime2
=
this
.
searchForm
.
receiveTimeRange
[
1
]
+
' 23:59:59'
}
//
const params = {
//
'page': page || this.pagination.currentPage,
//
'size': this.pagination.pageSize
//
}
//
params.assignee = localStorage.getItem('userId')
//
if (this.searchForm.receiveTimeRange && this.searchForm.receiveTimeRange.length) {
//
params.receiveTime1 = this.searchForm.receiveTimeRange[0] + ' 00:00:00'
//
params.receiveTime2 = this.searchForm.receiveTimeRange[1] + ' 23:59:59'
//
}
this
.
type
=
type
if
(
type
===
'单个签审'
)
{
get
(
'/indexTask/task/todoStatistics'
).
then
(
res
=>
{
if
(
params
.
page
===
1
)
{
this
.
taskList
=
[]
}
//
if (params.page === 1) {
//
this.taskList = []
//
}
this
.
addData
(
res
.
items
,
res
.
items
.
length
)
})
}
if
(
type
===
'已办任务'
)
{
get
(
'/indexTask/task/finishStatistics'
).
then
(
res
=>
{
if
(
params
.
page
===
1
)
{
this
.
taskList
=
[]
}
//
if (params.page === 1) {
//
this.taskList = []
//
}
this
.
addData
(
res
.
items
,
res
.
items
.
length
)
})
}
if
(
type
===
'我的请求'
)
{
post
(
`/workflow/inst?page=
${
params
.
page
}
&size=
${
params
.
size
}
`
,
{
'startedUserId'
:
localStorage
.
getItem
(
'userId'
),
'checkOwnerSignAddFlag'
:
true
}).
then
(
res
=>
{
if
(
params
.
page
===
1
)
{
this
.
taskList
=
[]
}
this
.
addData
(
res
.
items
.
content
,
res
.
items
.
totalElements
)
})
}
//
if (type === '我的请求') {
//
post(`/workflow/inst?page=${params.page}&size=${params.size}`, { 'startedUserId': localStorage.getItem('userId'), 'checkOwnerSignAddFlag': true }).then(res => {
//
if (params.page === 1) {
//
this.taskList = []
//
}
//
this.addData(res.items.content, res.items.totalElements)
//
})
//
}
},
addData
(
data
,
totalElements
)
{
data
.
forEach
((
item
)
=>
{
...
...
@@ -275,7 +275,7 @@ export default {
})
}
})
this
.
pagination
.
total
=
totalElements
//
this.pagination.total = totalElements
},
showIcon
(
row
)
{
return
showIcon
(
row
)
...
...
@@ -361,7 +361,7 @@ export default {
},
getMoreTaskData
()
{
if
(
this
.
clickNum
!==
this
.
pageCount
)
{
this
.
pagination
.
currentPage
+=
1
//
this.pagination.currentPage += 1
this
.
getTasks
(
this
.
pagination
.
currentPage
,
this
.
type
)
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