Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
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
fengzhaoyu
schedule
Commits
e635b0f0
Commit
e635b0f0
authored
4 years ago
by
xiexiaoqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:删除动态包含文件或任务时,修改详情数据
parent
557c89ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
31 deletions
+20
-31
meetingDetail.js
pages/meetingDetail/meetingDetail.js
+7
-1
store.js
pages/meetingDetail/store.js
+13
-30
No files found.
pages/meetingDetail/meetingDetail.js
View file @
e635b0f0
...
...
@@ -1192,8 +1192,14 @@ create.Page({
this
.
update
();
}
else
{
if
(
index
!==
-
1
)
{
this
.
store
.
data
.
affairList
.
splice
(
index
,
1
);
const
deleteData
=
this
.
store
.
data
.
affairList
.
splice
(
index
,
1
);
this
.
update
();
// 如果删除的动态包含文件和任务,需要修改
console
.
log
(
deleteData
)
if
(
deleteData
[
0
].
fileDetailList
||
deleteData
[
0
].
meetingTaskSimpleViewModel
)
{
this
.
getTaskAndFiles
(
this
.
store
.
data
.
affairList
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
pages/meetingDetail/store.js
View file @
e635b0f0
import
{
getCreateShowTime
}
from
'../../utils/utils'
;
import
{
getCreateShowTime
,
dealRepeatModal
}
from
'../../utils/utils'
;
import
{
updateMeetingTask
}
from
'../../api/request'
;
class
Store
{
data
=
{
...
...
@@ -20,16 +20,15 @@ class Store {
relatedAppPlatform
:
null
}
changeStatus
(
meetingId
,
taskModifyModel
,
callBack
)
{
const
data
=
{
meetingId
:
meetingId
,
platform
:
'dingTalk'
,
taskModifyModel
};
//
提前改
//
修改详情列表
const
index
=
this
.
data
.
affairList
.
findIndex
(
it
=>
it
.
commentId
===
taskModifyModel
.
commentId
);
if
(
index
!==
-
1
)
{
// 修改详情列表数据
const
changeData
=
this
.
data
.
affairList
[
index
];
changeData
.
meetingTaskSimpleViewModel
.
processState
=
taskModifyModel
.
processState
;
changeData
.
updateTime
=
getCreateShowTime
(
new
Date
());
...
...
@@ -37,39 +36,23 @@ class Store {
this
.
data
.
affairList
.
splice
(
index
,
1
);
this
.
data
.
affairList
.
unshift
(
changeData
);
// 修改任务列表页面数据
this
.
data
.
tasks
[
index
].
processState
=
taskModifyModel
.
processState
;
this
.
data
.
tasks
[
index
].
updateTime
=
getCreateShowTime
(
new
Date
());
this
.
update
();
// 页面定位到最上面
if
(
callBack
)
{
callBack
()
}
}
updateMeetingTask
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
// const index = this.data.affairList.findIndex(it => it.commentId === taskModifyModel.commentId);
// if (index !== -1) {
// // 修改详情列表数据
// const changeData = this.data.affairList[index];
// changeData.meetingTaskSimpleViewModel.processState = taskModifyModel.processState;
// changeData.updateTime = getCreateShowTime(new Date());
// this.data.affairList.splice(index, 1);
// this.data.affairList.unshift(changeData);
// // 修改任务列表页面数据
// this.data.tasks[index].processState = taskModifyModel.processState;
// this.data.tasks[index].updateTime = getCreateShowTime(new Date());
// this.update();
// if (callBack) {
// callBack()
// }
// }
// 修改任务列表页面
const
tasksIndex
=
this
.
data
.
tasks
.
findIndex
(
it
=>
it
.
commentId
===
taskModifyModel
.
commentId
);
if
(
tasksIndex
!==
-
1
)
{
this
.
data
.
tasks
[
tasksIndex
].
processState
=
taskModifyModel
.
processState
;
this
.
data
.
tasks
[
tasksIndex
].
updateTime
=
getCreateShowTime
(
new
Date
());
}
updateMeetingTask
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
!==
0
)
{
dd
.
alert
(
'操作失败,请重试'
)
}
});
}
...
...
This diff is collapsed.
Click to expand it.
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