Commit 5740c2b1 by fengzhaoyu

merge 创建任务

parents 995f311d b0363e4b
......@@ -65,7 +65,7 @@ view {
view.list-item {
border: none;
border-radius: 0;
border-bottom: 2rpx solid rgba(227, 228, 228);
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
margin-top: 0;
padding-top: 24rpx;
padding-bottom: 24rpx;
......
......@@ -44,5 +44,7 @@
.delete-btn {
position: absolute;
right: 16rpx;
bottom: 16rpx;
bottom: 9rpx;
line-height: 20rpx;
font-size: 28rpx;
}
\ No newline at end of file
......@@ -139,6 +139,6 @@
.file-showName {
position: absolute;
right: 0px;
top: 50%;
margin-top: -9px
bottom: -8rpx;
font-size: 24rpx;
}
\ No newline at end of file
......@@ -12,7 +12,7 @@ function padZero(val) {
// 生成分钟 每隔五分钟
function generateMin(max) {
const time = [];
for (let i = 0; i < max; i += 5) {
for (let i = 0; i < max; i += 15) {
time.push(padZero(i))
}
return time;
......
......@@ -3,6 +3,7 @@
border-radius: 16rpx;
padding: 16rpx;
margin-top: 16rpx;
margin-bottom: 1rpx;
}
.notes-edit {
......
......@@ -5,6 +5,7 @@
border-radius: 8rpx;
padding: 16rpx;
margin-top: 16rpx;
margin-bottom: 1rpx;
}
.task-list>.task-box {
......
......@@ -70,6 +70,14 @@ create.Page({
this.update();
this.closePopup();
},
updateTasks(data, callBack) {
updateMeetingTask(data).then(res => {
if (res.data.code == 0) {
callBack(res.data)
}
this.setData({ limitClick: false });
})
},
addTask() {
const task = this.store.data.currentTask;
......@@ -108,86 +116,81 @@ create.Page({
taskCreateModel.removeUserList = [task.originExcutor]
}
}
data.taskModifyModel = taskCreateModel
} else {
data.taskCreateModel = taskCreateModel
}
updateMeetingTask(data).then(res => {
if (res.data.code == 0) {
if (this.data.type === 'edit') {
//是否发送通知
dd.confirm({
title: '通知',
content: '是否更新动态列表通知其他成员?',
confirmButtonText: '通知',
cancelButtonText: '不通知',
success: (ret) => {
if (ret.confirm) {
if (res.data.data) {
const affairListIndex = this.store.data.affairList.findIndex(it => it.commentId === data.taskModifyModel.commentId)
const tasksIndex = this.store.data.tasks.findIndex(it => it.commentId === data.taskModifyModel.commentId)
const deleteData = this.store.data.affairList.splice(affairListIndex, 1);
this.store.data.tasks.splice(tasksIndex, 1)
const addData = res.data.data[0].commentListDataModelList[0];
addData.replyCommentList = deleteData[0].replyCommentList;
addData.updateTime = getCreateShowTime(addData.updateTime);
this.store.data.affairList.unshift(addData);
this.store.data.tasks.unshift(addData);
this.store.data.isNeedReloadIndexList = true;
if (affairListIndex > this.store.data.separateIndex && this.store.data.separateIndex !== -1) {
this.store.data.separateIndex += 1;
this.store.data.separateIndex = fixSeperateIndex(this.store.data.separateIndex, this.store.data.affairList)
}
//重置
this.store.data.currentTask = {};
this.update();
dd.navigateBack();
data.taskModifyModel = taskCreateModel;
//是否发送通知
dd.confirm({
title: '通知',
content: '是否更新动态列表通知其他成员?',
confirmButtonText: '通知',
cancelButtonText: '不通知',
success: (ret) => {
if (ret.confirm) {
data.notice = true;
this.updateTasks(data, (res) => {
if (res.data) {
const affairListIndex = this.store.data.affairList.findIndex(it => it.commentId === data.taskModifyModel.commentId)
const tasksIndex = this.store.data.tasks.findIndex(it => it.commentId === data.taskModifyModel.commentId)
const deleteData = this.store.data.affairList.splice(affairListIndex, 1);
this.store.data.tasks.splice(tasksIndex, 1)
const addData = res.data[0].commentListDataModelList[0];
addData.replyCommentList = deleteData[0].replyCommentList;
addData.updateTime = getCreateShowTime(addData.updateTime);
this.store.data.affairList.unshift(addData);
this.store.data.tasks.unshift(addData);
this.store.data.isNeedReloadIndexList = true;
if (affairListIndex > this.store.data.separateIndex && this.store.data.separateIndex !== -1) {
this.store.data.separateIndex += 1;
this.store.data.separateIndex = fixSeperateIndex(this.store.data.separateIndex, this.store.data.affairList)
}
} else {
const updateAffair = this.store.data.affairList.find(it => it.commentId === data.taskModifyModel.commentId);
const updateTask = this.store.data.tasks.find(it => it.commentId === data.taskModifyModel.commentId);
updateAffair.meetingTaskSimpleViewModel.title = updateTask.title = taskCreateModel.title;
updateAffair.meetingTaskSimpleViewModel.endTime = updateTask.endTime = taskCreateModel.endTime;
updateAffair.meetingTaskSimpleViewModel.executor = updateTask.excutor = excutor;
//重置
this.store.data.currentTask = {};
this.update();
dd.navigateBack();
dd.navigateBack();
}
}
})
})
} else {
data.notice = false;
this.updateTasks(data, (res) => {
const updateAffair = this.store.data.affairList.find(it => it.commentId === data.taskModifyModel.commentId);
const updateTask = this.store.data.tasks.find(it => it.commentId === data.taskModifyModel.commentId);
updateAffair.meetingTaskSimpleViewModel.title = updateTask.title = taskCreateModel.title;
updateAffair.meetingTaskSimpleViewModel.endTime = updateTask.endTime = taskCreateModel.endTime;
updateAffair.meetingTaskSimpleViewModel.executor = updateTask.excutor = excutor;
this.update();
dd.navigateBack();
})
} else {
// 修改动态列表
if (res.data.data) {
const addData = res.data.data[0].commentListDataModelList[0];
addData.updateTime = getCreateShowTime(addData.updateTime);
this.store.data.affairList.unshift(addData);
this.store.data.tasks.unshift(addData);
this.store.data.isNeedReloadIndexList = true;
if (this.store.data.separateIndex !== -1) {
this.store.data.separateIndex += 1;
}
this.store.data.currentTask = {};
this.update();
dd.navigateBack();
}
}
})
} else {
data.taskCreateModel = taskCreateModel
this.updateTasks(data, (res) => {
// 修改动态列表
if (res.data) {
const addData = res.data[0].commentListDataModelList[0];
addData.updateTime = getCreateShowTime(addData.updateTime);
this.store.data.affairList.unshift(addData);
this.store.data.tasks.unshift(addData);
this.store.data.isNeedReloadIndexList = true;
if (this.store.data.separateIndex !== -1) {
this.store.data.separateIndex += 1;
}
this.store.data.currentTask = {};
this.update();
dd.navigateBack();
}
this.setData({ limitClick: false });
})
}
})
}
}
});
......@@ -105,8 +105,8 @@
<view>{{item.hasDateLabel}}</view>
</view>
<view class="todayNoData">
<text>暂无日程安排,</text>
<text onTap="createMeeting">创建日程</text>
<text>暂无会议安排,</text>
<text onTap="createMeeting">创建会议</text>
</view>
</view>
</block>
......@@ -128,7 +128,7 @@
<view>动态</view>
</view>
</view>
<view onTap="changeTabBar" data-tabbar='1' data-title='日程'>
<view onTap="changeTabBar" data-tabbar='1' data-title='安排'>
<view class="tabBarView tabBarView2 {{$data.tabBarIndex === '1' ? 'ischooseTabBar' : ''}}">
<view class="iconfont iconicon_Calendarbox1">
<text a:if="{{offset == 'before'}}" class="iconfont iconicon_days iconicon_open">
......@@ -138,7 +138,7 @@
<text a:else class="iconfont iconicon_days iconicon_days{{iconDay}}">
</text>
</view>
<view>日程</view>
<view>安排</view>
</view>
</view>
<view class="createMeeting" onTap="createMeeting">
......
......@@ -157,12 +157,14 @@ create.Page({
dd.onSocketOpen((res) => {
console.log('连接已打开!');
dd.sendSocketMessage({
data: 'heartbeat', // 需要发送的内容
success: (res) => {
console.log('数据发送!' + 'heartbeat');
},
});
this.socketTimer = setInterval(() => {
dd.sendSocketMessage({
data: 'heartbeat', // 需要发送的内容
success: (res) => {
console.log('数据发送!' + 'heartbeat');
},
});
}, 25000)
});
......@@ -288,11 +290,12 @@ create.Page({
onHide() {
dd.closeSocket();
clearInterval(this.timer);
this.socketTimer && clearInterval(this.socketTimer);
this.timer = null;
this.socketTimer = null;
},
onUload() {
dd.closeSocket();
},
refresh() {
this.isNeverShowSchedulePage = true;
......
......@@ -77,14 +77,6 @@ page {
font-family: PingFangSC-Regular;
}
.checkbox {
border: 3rpx solid rgba(77, 217, 100, 1);
border-radius: 4rpx;
width: 28rpx;
height: 28rpx;
margin-right: 18rpx;
}
.footer {
background: #fff;
border-top: 2rpx solid rgba(25, 31, 37, 0.12);
......@@ -324,7 +316,7 @@ input {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #3070F2;
background: #1890FF;
color: white;
line-height: 80rpx;
text-align: center;
......@@ -549,11 +541,6 @@ input {
white-space: nowrap;
}
.metingDetail {
overflow: hidden;
height: 100vh;
}
.meetingWayImageUrl {
flex-grow: 0;
width: 40rpx;
......@@ -712,8 +699,10 @@ input {
/* line-height: 28px; */
/* padding: 16px 0; */
/* background: red; */
padding-right: 16rpx;
/* padding-right: 16rpx; */
/* margin-right: 16rpx; */
padding-right: 24rpx;
margin-right: 24rpx;
font-size: 24rpx;
color: #fff;
/* border-right: 1px solid rgba(255, 255, 255, 0.55); */
......
......@@ -97,7 +97,7 @@
</view>
<!-- 几个任务 -->
<view onTap="goTasksPage" class="taskNumber" a:if="{{tasks.length}}">
<view class="iconicon_task1 iconfont icon {{$data.showParticipatorList.length>1 ? '' : 'noValueIcon'}}"></view>
<view class="iconicon_task1 iconfont icon"></view>
<view class="fileText">
{{tasks.length}} 个任务
</view>
......@@ -105,11 +105,11 @@
</view>
<!-- 几个文件 -->
<view onTap="goFilesPage" class="taskNumber" a:if="{{files.length}}">
<view class="iconicon_data iconfont icon {{$data.showParticipatorList.length>1 ? '' : 'noValueIcon'}}"></view>
<view class="iconicon_data iconfont icon"></view>
<view class="fileText">
{{files.length}} 个附件
</view>
<view class="iconright iconfont icon" style=" vertical-align: middle"></view>
<view class="iconright iconfont icon" style="vertical-align: middle"></view>
</view>
<!-- 删除该会议 -->
<template is="deleteBtn" onhandleDelete="handleDelete" data="{{title: '删除该会议' }}"/>
......
......@@ -1098,8 +1098,8 @@ create.Page({
dd.confirm({
title: '通知',
content: '是否更新动态列表通知其他成员?',
confirmButtonText: '更新',
cancelButtonText: '不更新',
confirmButtonText: '通知',
cancelButtonText: '不通知',
success: (res) => {
if (res.confirm) {
this.updateNotes(notes, true, (index) => {
......@@ -1287,8 +1287,8 @@ create.Page({
dd.confirm({
title: '通知',
content: '是否更新动态列表通知其他成员?',
confirmButtonText: '更新',
cancelButtonText: '不更新',
confirmButtonText: '通知',
cancelButtonText: '不通知',
success: (res) => {
if (res.confirm) {
this.updateRemark(remark, true, (index) => {
......
export function getSelectRepeatId(recurrenceModel, repeatList) {
let id = 0;
for (let i = 0; i < repeatList.length; i++) {
if (repeatList[i].recurrenceModel.model === recurrenceModel.model) {
if (recurrenceModel.model === "weekly" && recurrenceModel.weekDayList.length === repeatList[i].recurrenceModel.weekDayList.length) {
return repeatList[i].id
if (recurrenceModel.model === "weekly") {
if (recurrenceModel.weekDayList.length === repeatList[i].recurrenceModel.weekDayList.length) {
id = repeatList[i].id;
}
} else {
id = repeatList[i].id;
}
return repeatList[i].id
}
}
return 0
return id;
}
export function getInitialPsarticipants(participants) {
let people = {}
......
......@@ -53,7 +53,7 @@ page {
width: 630rpx;
line-height: 112rpx;
height: 112rpx;
border-bottom: 1rpx solid #E3E4E4;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.close {
......@@ -66,8 +66,8 @@ page {
.addParticipants {
height: 100rpx;
line-height: 100rpx;
border-top: 1rpx solid #E3E4E4;
border-bottom: 1rpx solid #E3E4E4;
border-top: 1rpx solid rgba(25, 31, 37, 0.12);
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
opacity: 0.56;
line-height: 100rpx;
font-family: PingFangSC-Regular;
......
......@@ -49,17 +49,21 @@ create.Page({
endTime: this.$store.data.endTime.replace(/\//g, "-")
}
queryAvailableMeetingRoomByTime(data).then(res => {
const availableMeetingRoom = [];
if (res.data && res.data.data) {
const available = res.data.data.filter(it => it.available === true)
for (let value of available) {
if (value.meetingRoomFullName) {
value.meetingRoomFullName = `${value.meetingRoomFullName}-${value.name}`
} else {
value.meetingRoomFullName = `${value.name}`
res.data.data.forEach((it) => {
if (it.available) {
if (it.meetingRoomFullName) {
it.meetingRoomFullName = `${it.meetingRoomFullName}-${it.name}`
} else {
it.meetingRoomFullName = `${it.name}`
}
availableMeetingRoom.push(it)
}
}
})
that.setData({
availableMeetingRoom: available
availableMeetingRoom
})
}
......
......@@ -101,8 +101,8 @@
<view>{{item.hasDateLabel}}</view>
</view>
<view class="todayNoData">
<text>暂无日程安排,</text>
<text onTap="createMeeting">创建日程</text>
<text>暂无会议安排,</text>
<text onTap="createMeeting">创建会议</text>
</view>
</view>
</block>
......@@ -123,7 +123,7 @@
<view>动态</view>
</view>
</view>
<view onTap="changeTabBar" data-tabbar='1' data-title='日程'>
<view onTap="changeTabBar" data-tabbar='1' data-title='安排'>
<view class="tabBarView tabBarView2 {{$data.tabBarIndex === '1' ? 'ischooseTabBar' : ''}}">
<view class="iconfont iconicon_Calendarbox1">
<text a:if="{{offset == 'before'}}" class="iconfont iconicon_days iconicon_open">
......@@ -133,7 +133,7 @@
<text a:else class="iconfont iconicon_days iconicon_days{{iconDay}}">
</text>
</view>
<view>日程</view>
<view>安排</view>
</view>
</view>
<view class="createMeeting" onTap="createMeeting">
......
.avater {
border-radius: 50%;
background: #3070F2;
background: #1890FF;
color: white;
text-align: center;
}
......
.checkbox {
border: 3rpx solid rgba(77, 217, 100, 1);
border: 2rpx solid rgba(77, 217, 100, 1);
border-radius: 4rpx;
width: 28rpx;
height: 28rpx;
width: 36rpx;
height: 36rpx;
margin-right: 18rpx;
text-align: center;
line-height: 28rpx;
line-height: 36rpx;
border-radius: 50%;
}
.checkbox-active>.iconfont {
color: rgba(77, 217, 100, 1);
font-size: 24rpx;
top: -3rpx;
font-size: 26rpx;
top: -2rpx;
position: relative;
}
\ No newline at end of file
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