Commit c75c022b by xiexiaoqin

feat: 任务添加修改功能,修改接口还没对接

parent 1c79d8e9
......@@ -21,7 +21,7 @@
</view>
<view class="save" onTap="addTask">
<view class="button {{limitClick || !currentTask.title.trim() ? 'gray' : ''}}">
立即创建
{{type === 'edit' ? '立即修改' : '立即创建'}}
</view>
<view class="tabBarBottom" a:if="{{isIPX}}">
</view>
......
......@@ -11,11 +11,18 @@ create.Page({
currentTask: {},
show: false,
isIPX: false,
limitClick: false
limitClick: false,
type: 'create'
},
onLoad(query) {
if (query.type === 'edit') {
dd.setNavigationBar({
title: '编辑任务'
});
}
this.setData({
meetingId: query.meetingId,
type: query.type,
isIPX: checkFullScren()
})
},
......
......@@ -215,7 +215,7 @@
<text class="icondescribe11 iconfont color4" a:if="{{item.notes&&item.creator.ddUserId === currentPeople }}" catchTap="editNotes" data-meetingNotes="{{item.notes}}" data-commentId="{{item.commentId}}">
<text class="text">编辑</text>
</text>
<text class="icondescribe11 iconfont color4" a:if="{{item.commentType === 'task' &&item.creator.ddUserId === currentPeople }}" catchTap="editTask" data-meetingNotes="{{item.notes}}" data-commentId="{{item.commentId}}">
<text class="icondescribe11 iconfont color4" a:if="{{item.commentType === 'task' &&item.creator.ddUserId === currentPeople }}" catchTap="editTask" data-task="{{item.meetingTaskSimpleViewModel}}" data-commentId="{{item.commentId}}">
<text class="text">编辑</text>
</text>
<text class="iconcomments1 iconfont color4" data-commentId="{{item.commentId}}" catchTap="openComentModal">
......
......@@ -1049,7 +1049,18 @@ create.Page({
dd.navigateTo({ url: '/pages/createTask/createTask?meetingId=' + this.store.data.scheduleId })
},
editTask(e) {
dd.navigateTo({ url: '/pages/createTask/createTask?meetingId=' + this.store.data.scheduleId })
const { task } = e.currentTarget.dataset;
console.log(task)
const executor = (task.executor && task.executor.length > 0) ? task.executor[0] : {}
this.store.data.currentTask = {
endTime: task.endTime,
excutor: executor,
title: task.title,
excutorId: executor.userId
};
this.store.data.modifyDynamicId = '';
this.update();
dd.navigateTo({ url: '/pages/createTask/createTask?meetingId=' + this.store.data.scheduleId + '&type=edit' })
},
// 创建会议笔记
openNoteModal() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment