Commit 5740c2b1 by fengzhaoyu

merge 创建任务

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