Commit ab0de148 by xiexiaoqin

feat: 动态列表的操作

parent 1085475a
......@@ -149,7 +149,7 @@ export function getMeetingRoomRepeatAffairs(groupId, page) {
export function getMeetingRoomAffairs(id) {
return $http({
method: "get",
url: `/meet/comment/listByMeetingId?meetingId=${'71ca8d07c9830d7630a6e6bb0f432a59'}`
url: `/meet/comment/listByMeetingId?meetingId=${id}&platform=dingTalk`
});
}
//会议室创建新任务
......@@ -168,6 +168,21 @@ export function updateMeetingTask(data) {
url: `/meet/comment/handler`
});
}
// 修改动态
export function updateMoment(data) {
return $http({
method: 'post',
data: JSON.stringify(data),
url: '/meet/comment/modify'
})
}
// 删除动态
export function deleteMoment(id) {
return $http({
method: 'get',
url: `/meet/comment/remove?commentId=${id}`
})
}
//删除任务
export function deleteMeetingTask(id) {
return $http({
......
@import "../../template/avater/index.acss";
.avater {
width: 48rpx;
height: 48rpx;
margin-right: 16rpx;
}
.notes-edit {
min-height: 400rpx;
padding: 32rpx;
margin-bottom: 16rpx;
}
.comment {
background: rgba(246, 248, 249, 0.63);
border-radius: 4px;
padding: 16rpx;
}
.comment-text {
flex: 1;
font-size: 24rpx;
line-height: 40rpx;
}
.comment-text>view:first-child {
color: #0A0A0A;
}
.comment-text>view:last-child {
color: rgba(25, 31, 37, 0.4);
}
.comment>view {
position: relative;
display: flex;
}
.delete-btn {
position: absolute;
right: 16rpx;
bottom: 16rpx;
}
\ No newline at end of file
<view a:if="{{isEdit}}">
<form onSubmit="complete">
<textarea class="notes-edit" name="textarea" auto-height placeholder="输入评论内容"></textarea>
<button form-type="submit" class="picker-complete">完成</button>
</form>
</view>
<view a:else class="comment" a:for="{{replyCommentList}}">
<view>
<import src="../../template/avater/index.axml"/>
<template is="avater" data="{{item: item.creator }}"/>
<view class="comment-text">
<view>{{item.creator.name}}: {{item.remark}}</view>
<view>{{item.updateTime}}</view>
</view>
<view class="delete-btn" onTap="deleteComment" data-commentId="{{item.commentId}}">
删除
</view>
</view>
</view>
\ No newline at end of file
Component({
mixins: [],
data: {},
props: {},
didMount() { },
didUpdate() { },
didUnmount() { },
methods: {
complete: function (e) {
const value = e.detail.value.textarea;
if (!value) {
return dd.showToast({ content: '请输入评论内容' })
}
this.props.onGetComment(e.detail.value.textarea)
},
deleteComment: function (e) {
this.props.onDeleteComment(e.currentTarget.dataset.commentId)
}
},
});
{
"component": true
}
\ No newline at end of file
<view a:if="{{isEdit}}">
<form onSubmit="complete">
<textarea class="notes-edit" name="textarea" auto-height placeholder="输入笔记内容"></textarea>
<textarea value="{{notes ? notes.meetingNotes : ''}}" class="notes-edit" name="textarea" auto-height placeholder="输入笔记内容"></textarea>
<button form-type="submit" class="picker-complete">完成</button>
</form>
</view>
<view a:else class="notes">
{{notes}}
{{meetingNotes}}
</view>
\ No newline at end of file
Component({
import create from 'dd-store';
import pageStore from '../../pages/meetingDetail/store';
create.Component({
store: pageStore,
mixins: [],
data: {},
data: {
notes: null //store
},
props: {},
didMount() { },
didUpdate() { },
......
......@@ -60,7 +60,7 @@ create.Page({
taskCreateModel: {
endTime: this.store.data.currentTask.endTime.replace(/\//g, '-'),
title: this.store.data.currentTask.title,
executorList: [this.store.data.currentTask.excutor]
innerTaskExecutorList: [this.store.data.currentTask.excutor]
}
}).then(res => {
if (res.data.code == 0) {
......
......@@ -25,7 +25,7 @@
</view>
<file-list a:if="{{dynamicItem.fileDetailList}}" fileView="{{dynamicItem}}" isCanEdit="{{false}}"/>
<task-list a:if="{{dynamicItem.meetingTaskSimpleViewModel}}" onChangeTaskStatusOnList="onChangeTaskStatusOnList" taskView="{{dynamicItem.meetingTaskSimpleViewModel}}" commentId="{{dynamicItem.commentId}}" meetingId="{{item.meetingId}}" isCanEdit="{{false}}"/>
<notes a:if="{{dynamicItem.notes}}" notes="{{dynamicItem.notes}}"/>
<notes a:if="{{dynamicItem.notes}}" meetingNotes="{{dynamicItem.notes}}"/>
</view>
</block>
</view>
......
......@@ -32,7 +32,7 @@ page {
.compose-column {
position: relative;
padding-left: 104rpx;
margin-bottom: 48rpx;
margin-bottom: 24rpx;
padding-top: 16rpx;
}
......
......@@ -237,13 +237,17 @@
</view>
<task-list a:if="{{item.meetingTaskSimpleViewModel}}" onChangeTaskStatusOnList="onChangeTaskStatusOnList" taskView="{{item.meetingTaskSimpleViewModel}}" commentId="{{item.commentId}}" meetingId="{{meetingId}}" isCanEdit="{{false}}"/>
<file-list a:if="{{item.fileDetailList}}" fileView="{{item}}"/>
<notes a:if="{{item.notes}}" notes="{{item.notes}}"/>
<notes a:if="{{item.notes}}" meetingNotes="{{item.notes}}"/>
<view class="meeting-title" a:if="{{item.commentType === 'meeting'}}">创建了会议</view>
</view>
<view class="compose-column-operation">
<text>编辑</text>
<text>删除</text>
<text>评论</text>
<text a:if="{{item.fileDetailList}}" onTap="editRemark">描述</text>
<text a:if="{{item.notes}}" onTap="editNotes" data-meetingNotes="{{item.notes}}" data-commentId="{{item.commentId}}">编辑</text>
<text onTap="handleDeleteMoment" data-commentId="{{item.commentId}}">删除</text>
<text data-commentId="{{item.commentId}}" onTap="openComentModal">评论</text>
</view>
<view class="compose-column">
<comment a:if="{{item.replyCommentList}}" replyCommentList="{{item.replyCommentList}}" onDeleteComment="deleteComment"/>
</view>
</block>
<view class="affair-placeholder" a:if="{{!affairList || affairList.length == 0}}">
......@@ -258,6 +262,7 @@
<list multiple="{{comListData.multiple}}" onCompelete="selectAheadtimes" comSelectList="{{comListData.aheadTimesListId}}" complete="{{comType=='aheadTime' ? true : false}}" a:if="{{comType=='repeat' || comType=='aheadTime'}}" dataComList="{{comType=='repeat' ? comListData.repeatList : comListData.aheadTimesList}}" onComSelectList="selectComList" comSelectListId="{{comType=='repeat' ? comListData.comSelectListId : comListData.aheadTimesListId}}" iconType="{{comListData.iconType}}"></list>
<list a:if="{{comType == 'meetingWayModel'}}" dataComList="{{relatedAppPlatform.includes('zoom') ? comListData.meetingWayList: [comListData.meetingWayList[0]] }}" onComSelectList="selectComList" comSelectListId="{{comListData.meetingWayModelId}}" iconType="{{comListData.iconType}}"></list>
<notes a:if="{{comType == 'notesModal'}}" isEdit="{{true}}" onGetNotes="getNotes"/>
<comment a:if="{{comType == 'commentModal'}}" isEdit="{{true}}" onGetComment="getComment"/>
</popup>
<!-- 分享的弹窗 -->
<!--<popup a:if="{{comShareData.isShow}}" show="{{comShareData.isShow}}" title="{{comShareData.shareTitle}}" mask="{{true}}" onClose="closeShare"><sharelist dataComList="{{comShareData.shareDataList}}" onSelectComHList="closeShare"></sharelist></popup> -->
......
......@@ -2,7 +2,7 @@ import create from 'dd-store';
import { checkFullScren } from "../../utils/checkFullScren";
import pageStore from './store';
import { saveFileInfo, getMeetingRoomAffairs, createMeetingTask, deleteMeetingTask, updateMeetingTask, uploadPermissions } from '../../api/request';
import { getOssPermission, getuploadResource, isParticipate, deleteSchedule, getScheduleDetail, getUserScheduleInTime, modifySchedule, getMeetingRoomRepeatAffairs } from '../../api/request.js'
import { getOssPermission, getuploadResource, isParticipate, deleteSchedule, getScheduleDetail, getUserScheduleInTime, modifySchedule, getMeetingRoomRepeatAffairs, updateMoment, deleteMoment } from '../../api/request.js'
import { throttle, getCreateShowTime } from './../../utils/utils.js'
import { observer } from '/utils/observer.js'
import { resolve } from 'path';
......@@ -1550,6 +1550,12 @@ create.Page({
if (it.createTime) {
it.updateTime = getCreateShowTime(it.updateTime);
}
if (it.replyCommentList) {
it.replyCommentList.map(item => {
item.updateTime = getCreateShowTime(item.updateTime);
return item
})
}
return it
})
},
......@@ -1874,9 +1880,11 @@ create.Page({
})
}
},
// 创建任务
goCreateTask(e) {
dd.navigateTo({ url: '/pages/createTask/createTask?meetingId=' + this.store.data.scheduleId })
},
// 创建会议笔记
openNoteModal() {
this.setData({
popupShow: true,
......@@ -1884,13 +1892,94 @@ create.Page({
comType: 'notesModal'
})
},
// 编辑笔记
editNotes(e) {
this.store.data.notes = {
meetingNotes: e.currentTarget.dataset.meetingNotes,
commentId: e.currentTarget.dataset.commentId,
notice: true,
meetingId: this.store.data.scheduleId
}
this.update();
this.setData({
popupShow: true,
popupTitle: '编辑会议笔记',
comType: 'notesModal'
})
},
getNotes(notes) {
//编辑
if (this.store.data.notes) {
updateMoment({
...this.store.data.notes,
platform: 'dingTalk',
meetingNotes: notes
}).then(res => {
if (res.data.code == 0) {
this.closePopup();
// clear
this.store.data.notes = null;
this.update();
}
})
return
}
//创建
updateMeetingTask({
platform: 'dingTalk',
meetingId: this.store.data.scheduleId,
notesModel: {
meetingNotes: notes
}
}).then(res => {
if (res.data.code == 0) {
this.closePopup();
}
})
},
//添加评论
openComentModal(e) {
this.store.data.parentCommentId = e.currentTarget.dataset.commentId,
this.update();
this.setData({
popupShow: true,
popupTitle: '添加评论',
comType: 'commentModal'
})
},
getComment(comment) {
updateMeetingTask({
parentCommentId: this.store.data.parentCommentId,
platform: 'dingTalk',
remark: comment,
notice: false,
meetingId: this.store.data.scheduleId,
}).then(res => {
if (res.data.code == 0) {
this.closePopup();
}
})
},
// 删除动态
handleDeleteMoment(e){
this.deleteComment(e.currentTarget.dataset.commentId)
},
// 删除评论,删除动态
deleteComment(commnetId) {
dd.confirm({
title: '删除',
content: '确认要删除吗?',
confirmButtonText: '确定',
cancelButtonText: '取消',
success: (res) => {
if (res.confirm) {
deleteMoment(commnetId).then(res => {
if (res.code === 0) {
}
})
}
}
})
}
});
......
......@@ -4,6 +4,7 @@
"popup": "../../components/popup/index",
"task-list": "../../components/taskList/taskList",
"notes": "../../components/notes/notes",
"comment": "../../components/comment/comment",
"file-list": "../../components/fileList/fileList",
"task-panel": "../../components/taskPanel/taskPanel",
"list": "../../components/list/list",
......
......@@ -7,6 +7,8 @@ class Store {
title: '',
excutorId: ''
},
notes: null,
parentCommentId: '',
fileInfos: null,
description: '',
oldFileInfos: '',
......
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