Commit f15357ea by xiexiaoqin

fix conflit

parents 816ddac4 1bb8eff3
import {
getDynamicList,
meetingCollection,
updateMeetingTask
} from "../../api/request";
import { getCreateShowTime } from "../../utils/utils";
import create from 'dd-store';
create.Component({
mixins: [],
data: {
traceTime: '1970-03-01 00:00:00',
isStopBodyScroll: false,
dynamicList: [],
current: 1,
pages: 1,
loading: true
},
props: {},
didMount() {
this.getPages(1);
},
didUpdate() {
console.log(this.data.dynamicList, 111)
},
didUnmount() { },
methods: {
setBodyDisableScroll(isStopBodyScroll) {
this.setData({
isStopBodyScroll
})
},
//点击页面关闭侧滑模块
closeSwipe() {
if (this.$store.closeActiveSwipe) {
this.$store.closeActiveSwipe()
}
},
getPages(current, callBack) {
getDynamicList({
current,
size: 10
}).then(res => {
if (!res.data.data) {
this.setData({
loading: false
})
return;
}
const dynamicList = res.data.data.records.map((item, index) => {
for (let i = 0; i < item.meetingLogDataList.length; i++) {
item.meetingLogDataList[i].meetingLogResource.groupId = item.groupId
if (item.meetingLogDataList[i].creatorInfo) {
item.meetingLogDataList[i].creatorInfo = JSON.parse(
item.meetingLogDataList[i].creatorInfo
);
}
if (item.meetingLogDataList[i].createTime) {
item.meetingLogDataList[i].createTime = getCreateShowTime(
item.meetingLogDataList[i].createTime
);
}
let itemData = item.meetingLogDataList[i].meetingLogResource;
if (itemData) {
if (itemData.taskInfos || itemData.fileInfos) {
if (itemData.creatorInfo) {
itemData.creatorInfo = JSON.parse(itemData.creatorInfo);
}
if (itemData.fileInfos) {
itemData.fileInfos = JSON.parse(itemData.fileInfos);
}
if (itemData.taskInfos) {
itemData.taskInfos = JSON.parse(itemData.taskInfos);
}
if (itemData.acceptorInfo) {
itemData.acceptorInfo = JSON.parse(itemData.acceptorInfo);
}
}
}
}
return item
});
//第一页数据会重新请求需要替换
if (current === 1) {
this.setData({
dynamicList
});
} else {
const newDynamicList = this.data.dynamicList.concat(dynamicList);
this.setData({
dynamicList: newDynamicList
});
}
this.setData({
loading: false,
current: res.data.data.current,
pages: res.data.data.pages,
});
if (callBack) {
callBack()
}
});
},
changeCollection(e) {
const { index, scheduleId, collection } = e.target.dataset;
meetingCollection({
scheduleId,
collection
}).then(res => {
//取消置顶
if (collection === "N") {
// 重新获取第一页的数据
this.getPages(1, () => {
dd.showToast({
content: '取消成功'
})
});
} else {
//置顶
const dynamicList = this.data.dynamicList;
const replaceItem = dynamicList[index];
dynamicList[index].traceTime = res.data.data;
dynamicList.splice(index, 1);
dynamicList.unshift(replaceItem);
this.setData({
dynamicList: dynamicList
}, () => {
dd.showToast({
content: '置顶成功'
})
});
}
});
},
onScrollToLower() {
if (this.data.current < this.data.pages) {
this.getPages(this.data.current + 1);
}
},
onChangeTaskStatusOnList(e) {
const data = {
groupId: e.groupId,
scheduleId: e.scheduleId,
resourceType: "task",
creatorId: getApp().globalData.userid,
creatorInfo: getApp().globalData.userInfo,
id: e.id,
logType: "task_status_modify",
taskStatus: e.status
};
updateMeetingTask(data).then(res => {
if (res.data.code === 0) {
let dataIndex1 = "";
let dataIndex2 = "";
this.data.dynamicList.forEach((item, index) => {
if (item.scheduleId === e.scheduleId) {
dataIndex1 = index;
item.meetingLogDataList.forEach((it, index2) => {
if (it.meetingLogResource.id == e.id) {
dataIndex2 = index2;
}
});
}
});
const setData = `dynamicList[${dataIndex1}].meetingLogDataList[${dataIndex2}].meetingLogResource.taskStatus`;
this.setData({
[setData]: e.status
});
}
});
},
nextPage(event) {
this.$store.data.tabBarIndex = '0'
this.update()
dd.navigateTo({ url: `./../meetingDetail/meetingDetail?scheduleItem=${JSON.stringify(event.currentTarget.dataset.item)}` });
},
}
});
......@@ -4,7 +4,6 @@ setGlobalStore(exampleStore);
App({
onLaunch(options) {
// 第一次打开
// options.query == {number:1}
// console.info('App onLaunch');
......@@ -13,6 +12,7 @@ App({
// 从后台被 scheme 重新打开
// options.query == {number:1}
},
globalData: {
loading: false,
token: '',
......@@ -20,7 +20,7 @@ App({
userid: '',
name: '',
userInfo: '',
// globalUrl:'https://gateway2.mingwork.com', // 线上地址
// globalUrl: 'https://gateway2.mingwork.com', // 线上地址
globalUrl: 'https://gateway-beta.mingwork.com' //beta地址
// globalUrl: 'http://192.168.1.111' //beta地址
// globalUrl:'http://139.196.213.18:9999' //beta地址
......
......@@ -81,4 +81,10 @@ picker-view .column {
left: 32rpx;
right: auto;
color: red;
}
.tabBarBottom {
height: 68rpx;
width: 100%;
background: #fff;
}
\ No newline at end of file
......@@ -40,4 +40,6 @@
</picker-view-column>
</block>
</picker-view>
<view class="tabBarBottom" a:if="{{isIPX}}">
</view>
</view>
\ No newline at end of file
......@@ -259,6 +259,7 @@ Component({
})
} else {
// 实时校验
this.checkValue(startDate, this.data.endPostTime);
}
}
......@@ -294,12 +295,18 @@ Component({
},
changeWay() {
this.setData({
isEndTimeCustom: true
isEndTimeCustom: true,
currentTab: 'end'
});
//如果在end tab 切换, 需要设置结束时间的pick column回显
if (this.data.currentTab == 'end') {
//重新计算结束时间 开始时间+持续时间
const endDate = getDateByPickValue(this.data.start.pickValue);
endDate.setMinutes(endDate.getMinutes() + getDurationValue(this.data.duration.label));
this.changeEnd(endDate);
this.setData({
pickValue: this.data.end.pickValue
pickValue: this.data.end.pickValue,
});
}
},
......
.sidebarContent {
background: #FFFFFF;
width: 640rpx;
height: 100%;
padding: 32rpx 0 32rpx 32rpx;
}
.sidebarLogo {
margin-bottom: 18rpx;
line-height: 64rpx;
font-size: 26rpx;
color: rgba(27, 38, 61, .56);
display: flex;
}
.sidebarLogo view:nth-of-type(1) {
margin-right: 34rpx;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: #3070F2;
color: white;
overflow: hidden;
}
.sidebarLogo view:nth-of-type(1) image {
width: 64rpx;
height: 64rpx;
}
.hasAssociated, .unAssociated {
margin-top: 48rpx;
}
.associated {
font-size: 24rpx;
color: rgba(25, 31, 37, .56);
line-height: 34px;
margin-bottom: 16rpx;
}
.applicationList {
height: 104rpx;
display: flex;
align-items: center;
}
.applicationLogo {
width: 72rpx;
height: 72rpx;
margin-right: 24rpx;
}
.applicationMsg {
flex: 1;
display: flex;
border-bottom: 1px solid rgba(241, 243, 249, 1);
height: 104rpx;
align-items: center;
padding-right: 32rpx;
}
.applicationMsg>view:nth-of-type(1) {
flex: 1;
}
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(1) {
font-size: 28rpx;
color: #191F25;
margin-bottom: 8rpx;
}
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(2) {
opacity: 0.56;
font-size: 20rpx;
color: #191F25;
}
.operateIcon {
width: 32rpx;
height: 32rpx;
}
.operateIcon .iconright {
font-size: 28rpx;
color: rgba(27, 38, 61, .5)
}
.operateIcon .iconicon_setting1 {
font-size: 32rpx;
color: rgba(27, 38, 61, .5)
}
.Outlook {
background: url(../../assests/outlookLogo.png) center /100% 100%;
}
.Zoom {
background: url(../../assests/zoomLogo.png) center /100% 100%;
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
已关联应用
</view>
<view class="applicationList">
<view class="applicationLogo">
<view class="applicationLogo Zoom">
</view>
<view class="applicationMsg">
<view>
......@@ -21,7 +21,7 @@
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
<text class="iconfont iconicon_setting1"></text>
</view>
</view>
</view>
......@@ -31,43 +31,9 @@
可关联应用
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
<view class="applicationList">
<view class="applicationLogo">
<view class="applicationLogo Outlook">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view class="applicationMsg" catchTap="bindingOutlook">
<view>
<view>
Outlook日历
......
......@@ -9,7 +9,14 @@ Component({
userInfo: JSON.parse(getApp().globalData.userInfo)
});
},
didUpdate() { },
didUnmount() { },
methods: {},
didUpdate() {},
didUnmount() {},
methods: {
preventSort() {
return false;
},
bindingOutlook() {
dd.navigateTo({ url: "./../bindingOutlook/bindingOutlook" });
}
}
});
......@@ -6,7 +6,9 @@ Component({
props: {
isCanEdit: true
},
didMount() { },
didMount() {
console.log(this.props.taskList, 1111)
},
didUpdate() {
},
didUnmount() { },
......
......@@ -33,6 +33,7 @@ input {
font-size: 40rpx;
font-family: PingFangSC-Medium;
width: 100%;
height: 52rpx;
}
.title>.icon {
......@@ -54,7 +55,8 @@ input {
}
.remark .placeholder {
font-size: 28rpx
font-size: 28rpx;
font-family: PingFangSC-Regular;
}
.place, .time, .participator, .meetingWay {
......@@ -88,13 +90,13 @@ input {
justify-content: space-between;
}
.meetingWay .close, .place .close, .participator .iconicon_open {
.meetingWay .close, .place .close, .participator .iconright {
color: #9599A2;
}
.close {
font-size: 32rpx;
color: rgba(10, 10, 10, 0.4)
color: rgba(10, 10, 10, 0.3)
}
.repeatModal {
......@@ -163,10 +165,10 @@ input {
}
.conflict {
line-height: 13px;
line-height: 15px;
vertical-align: top;
width: 13px;
height: 13px;
width: 15px;
height: 15px;
position: absolute;
background: #fff;
bottom: 0rpx;
......@@ -256,4 +258,10 @@ input {
.iconicon_repeat1 {
color: rgba(10, 10, 10, 0.4)
}
.tabBarBottom {
height: 68rpx;
width: 100%;
background: #fff;
}
\ No newline at end of file
......@@ -7,7 +7,7 @@
</view>
</view>
<view class="remark" a:if="{{isShowRemark}}">
<input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" focus="{{false}}" />
<input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" focus="{{true}}" />
</view>
</view>
<!-- $data.$data.roomId locationName 地点 -->
......@@ -68,7 +68,7 @@
{{conflictPeople.length}}人会议安排冲突
</view>
</view>
<view class="iconicon_open iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
<view class="iconright iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
</view>
<view class="participatorListBottom" catchTap="nextPage" data-nextPage="participantsDetail">
<view class="people" a:for="{{$data.participatorList.length > 10 ? [...$data.participatorList].splice(0, 11) : $data.participatorList}}">
......@@ -110,9 +110,11 @@
<view class="button">
立即创建
</view>
<view class="tabBarBottom" a:if="{{isIPX}}">
</view>
</view>
<popup title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<meeting-time-picker a:if="{{'time' === comType}}" onComplete="onComplete"></meeting-time-picker>
<meeting-time-picker a:if="{{'time' === comType}}" onComplete="onComplete" isIPX="{{isIPX}}"></meeting-time-picker>
<hlist a:if="{{'participator' === comType}}" dataComList="{{comHListData.contactData}}" onSelectComHList="selectComHList"></hlist>
<list a:if="{{comType=='repeat' || comType=='meetingWayModel'}}" dataComList="{{comType=='repeat' ? comListData.repeatList : comListData.meetingWayList}}" onComSelectList="selectComList" comSelectListId="{{comType=='repeat' ? comListData.comSelectListId : comListData.meetingWayModelId}}" iconType="{{comListData.iconType}}">
</list>
......
import { addSchedule, getUserScheduleInTime } from '../../api/request.js'
import { throttle, getInterTime } from './../../utils/utils.js'
import { checkFullScren } from "../../utils/checkFullScren";
import create from 'dd-store'
create.Page({
data: {
......@@ -44,7 +45,8 @@ create.Page({
week: '',
isAcrossDay: false,
conflictPeople: [],
placeholder: ''
placeholder: '',
isIPX: false
},
showPop(event) {
......@@ -66,6 +68,7 @@ create.Page({
title: `创建会议`
})
this.setData({
isIPX: checkFullScren(),
placeholder: `${getApp().globalData.name}创建的会议`
})
this.reset()
......
.tabBar {
width: 100%;
position: fixed;
left: 0;
bottom: 0;
/* box-shadow: 0 -4rpx 8rpx 0 rgba(0,0,0,0.04);
border-radius: 0 64rpx 0 64rpx 0 0 0; */
}
.tabBarContaint {
display: flex;
height: 120rpx;
background: url('../../assests/tabBarBg.png');
background-size: cover;
padding-top: 4rpx;
}
.tabBarContaint>view {
flex: 1;
font-size: 28rpx;
}
.tabBarContaint>view:nth-of-type(1) {
text-align: left;
}
.tatabBarContaintbBar>view:nth-of-type(2) {
text-align: right;
}
.createMeeting {
position: absolute;
left: 50%;
top: 8rpx;
font-size: 32rpx;
border-radius: 50%;
height: 84rpx;
width: 84rpx;
background: #EA0C28;
box-shadow: 0 4px 7px 0 rgba(234, 12, 40, 0.30);
margin-left: -42rpx;
color: #FFFFFF;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.createMeeting .iconfont {
font-size: 34rpx;
display: block
}
.tabBarView {
display: flex;
flex-direction: column;
height: 116rpx;
justify-content: center;
}
.tabBarView1 {
padding-left: 140rpx;
align-items: flex-start;
}
.tabBarView2 {
padding-right: 140rpx;
align-items: flex-end;
}
.tabBarView>view {
display: block;
color: rgba(10, 10, 10, .4)
}
.tabBarView>view:nth-of-type(1) {
width: 42rpx;
height: 42rpx;
font-size: 42rpx;
margin-bottom: 11rpx;
}
.tabBarView>view:nth-of-type(2) {
height: 10rpx;
font-size: 20rpx;
}
.ischooseTabBar>view {
color: rgba(10, 10, 10, 1) !important;
}
.iconicon_Calendarbox1 {
position: relative;
}
.iconicon_days {
position: absolute;
left: 5rpx;
top: 8rpx;
font-size: 30rpx;
}
.tabBarView .iconicon_days {
color: #FFFFFF !important;
}
.tabBarBottom {
height: 68rpx;
width: 100%;
background: #fff;
}
\ No newline at end of file
<view a:if="{{$data.tabBarIndex === '0'}}">
<my-dynamic>
</my-dynamic>
</view>
<view a:if="{{$data.tabBarIndex === '1'}}">
<my-schedule update="{{$data.indexNeedUpdate}}">
</my-schedule>
</view>
<view class="tabBar">
<view class="tabBarContaint">
<view onTap="changeTabBar" data-tabbar='0'>
<view class="tabBarView tabBarView1 {{$data.tabBarIndex === '0' ? 'ischooseTabBar' : ''}}">
<view class="iconfont iconicon_dynamic"></view>
<view>动态</view>
</view>
</view>
<view onTap="changeTabBar" data-tabbar='1'>
<view class="tabBarView tabBarView2 {{$data.tabBarIndex === '1' ? 'ischooseTabBar' : ''}}">
<view class="iconfont iconicon_Calendarbox1">
<text class="iconfont iconicon_days iconicon_days{{iconDay}}">
</text>
</view>
<view>日程</view>
</view>
</view>
<view class="createMeeting" onTap="createMeeting">
<text class="iconfont iconicon_add1"></text>
</view>
</view>
<view class="tabBarBottom" a:if="{{isIPX}}">
</view>
</view>
\ No newline at end of file
import { getFormatDate } from "../../utils/utils";
import { checkFullScren } from "../../utils/checkFullScren";
import create from "dd-store";
create.Page({
data: {
$data: null,
iconDay: "",
isLocation: false,
isIPX: false,
},
onLoad() {
let iconDay = new Date().getDate();
this.setData({
iconDay: iconDay,
isIPX: checkFullScren()
});
dd.setNavigationBar({
title: "动态"
});
},
onShow() {
setTimeout(res => {
this.update();
}, 100);
},
// 修改tabBar
changeTabBar(e) {
let nowtabBarIndex = this.$store.data.tabBarIndex;
this.$store.data.tabBarIndex = e.currentTarget.dataset.tabbar
this.update()
let title = "动态";
switch (e.currentTarget.dataset.tabbar) {
case '0':
title = '动态186';
break;
case "1":
title = "日程";
break;
}
dd.setNavigationBar({
title: title
});
if (
nowtabBarIndex === e.currentTarget.dataset.tabbar &&
e.currentTarget.dataset.tabbar === "1"
) {
if (!this.$store.data.indexNeedUpdate) {
this.$store.locationSchedule();
}
}
},
createMeeting() {
dd.navigateTo({ url: "./../createMeeting/createMeeting" });
}
});
......@@ -194,7 +194,8 @@ input {
}
.remark .placeholder {
font-size: 28rpx
font-size: 28rpx;
font-family: PingFangSC-Regular;
}
.meetingWay {
......@@ -232,13 +233,13 @@ input {
justify-content: space-between;
}
.meetingWay .close, .place .close, .participator .iconicon_open {
.meetingWay .close, .place .close, .participator .iconright {
color: #9599A2;
}
.close {
font-size: 32rpx;
color: rgba(10, 10, 10, 0.4)
color: rgba(10, 10, 10, 0.3)
}
.repeatModal {
......@@ -307,10 +308,10 @@ input {
}
.conflict {
line-height: 13px;
line-height: 15px;
vertical-align: top;
width: 13px;
height: 13px;
width: 15px;
height: 15px;
position: absolute;
background: #fff;
bottom: 0rpx;
......@@ -525,6 +526,8 @@ input {
border-top: 1px solid rgba(239, 242, 245, 1);
padding-top: 168rpx;
text-align: center;
width: 600rpx;
margin: 0 auto;
}
.affair-placeholder image {
......@@ -583,4 +586,10 @@ input {
.participateText {
vertical-align: middle
}
.tabBarBottom {
height: 68rpx;
width: 100%;
background: #fff;
}
\ No newline at end of file
......@@ -37,7 +37,7 @@
<view class="permission" a:if="{{currentPeople != organizer}}">
</view>
<view class="place">
<view class="iconicon_room iconfont icon" a:if="{{roomId}}">
<view class="iconicon_room iconfont icon" a:if="{{$data.roomId}}">
</view>
<view class="iconicon_location1 iconfont icon {{$data.locationName ? '' : 'noValueIcon'}}" a:else>
</view>
......@@ -98,7 +98,7 @@
{{conflictPeople.length}}人会议安排冲突
</view>
</view>
<view class="iconicon_open iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
<view class="iconright iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
</view>
<view class="participatorListBottom" catchTap="nextPage" data-nextPage="participantsDetail">
<view class="people" a:for="{{$data.participatorList.length > 10 ? [...$data.participatorList].splice(0, 11) : $data.participatorList}}">
......@@ -193,6 +193,8 @@
<text class="iconfont iconicon_share1"></text>
</view>
</view>
<view class="tabBarBottom" a:if="{{isIPX}}">
</view>
</view>
<centerpopup centerPopup="{{centerPopup.showCenterPopup}}" centerPopupList="{{centerPopup.centerPopupList}}" onSelectSend="onSelectSend"></centerpopup>
<toast showToast="{{conToastData.showToast}}" title="{{conToastData.title}}" onToastHidden="onToastHidden"></toast>
......@@ -230,7 +232,7 @@
</block>
<view a:else>正在加载</view>
<popup a:if="{{popupShow}}" title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<meeting-time-picker a:if="{{'time' === comType}}" onComplete="onComplete" startTime="{{$data.startTime}}" endTime="{{$data.endTime}}"></meeting-time-picker>
<meeting-time-picker a:if="{{'time' === comType}}" onComplete="onComplete" startTime="{{$data.startTime}}" endTime="{{$data.endTime}}" isIPX="{{isIPX}}"></meeting-time-picker>
<hlist a:if="{{'participator' === comType}}" dataComList="{{comHListData.contactData}}" onSelectComHList="selectComHList"></hlist>
<list multiple="{{comListData.multiple}}" onCompelete="selectAheadtimes" comSelectList="{{comListData.aheadTimesListId}}" complete="{{comType=='aheadTime' ? true : false}}"a:if="{{comType=='repeat' || comType=='meetingWayModel' || comType=='aheadTime'}}" dataComList="{{comType=='repeat' ? comListData.repeatList : (comType=='aheadTime' ? comListData.aheadTimesList : comListData.meetingWayList)}}" onComSelectList="selectComList" comSelectListId="{{comType=='repeat' ? comListData.comSelectListId : (comType=='aheadTime'?comListData.aheadTimesListId : comListData.meetingWayModelId)}}" iconType="{{comListData.iconType}}">
</list>
......
......@@ -155,7 +155,7 @@
width: 100%;
height: 732rpx;
overflow: hidden;
margin-top: -10px;
margin-top: 10rpx;
}
.modalHeader {
......
......@@ -76,7 +76,6 @@ input {
right: 0;
padding: 32rpx;
background: #fff;
box-shadow: 0 -2px 4px 0 rgba(0, 0, 0, 0.04);
bottom: 0;
}
......@@ -93,10 +92,10 @@ input {
}
.conflict {
line-height: 13px;
line-height: 15px;
vertical-align: top;
width: 13px;
height: 13px;
width: 15px;
height: 15px;
position: absolute;
background: #fff;
bottom: 0rpx;
......
import { getUserScheduleInTime, modifySchedule } from '../../api/request.js'
import { getUserScheduleInTime } from '../../api/request.js'
import { throttle } from './../../utils/utils.js'
import create from 'dd-store'
import { observer } from '/utils/observer.js'
// 传递给组件toast的所有数据
const conToastData = {
showToast: false,
title: '保存成功'
}
create.Page({
data: {
$data: null,
userList: [],
userListId: [],
outlookContact: [],
value: '',
conflictPeople: [],
scheduleItem: '',
// 传给组件 hList 水平排列 所有数据 comHListData
comHListData: {
contactData: [
{ id: 0, text: '钉钉联系人', imageUrl: '../../assests/dingContact.png' },
{ id: 1, text: '手动添加邮箱', imageUrl: '../../assests/emailContact.png' }
]
},
popupShow: false,
// 传递给组件selectPopup 的数据
conSelectPopupData: {
selectPopupId: '',
showSelectPopup: false,
selectType: 'common',
editSaveList: [{ text: '仅保存此会议', id: 'only' }, { text: '保存此次及以后会议', id: 'future' }]
},
// 传递给组件centerPopup 的数据
centerPopup: {
showCenterPopup: false,
centerPopupList: [
{ id: 0, text: '不发送通知' },
{ id: 1, text: '发送通知' },
{ id: -1, text: '取消编辑' }
],
centerPopupId: ''
},
// 传递给组件toast的所有数据
conToastData: {
showToast: false,
title: '保存成功'
},
currentPeople: ''
conToastData: conToastData,
currentPeople: '',
value: '',
},
onLoad(event) {
const _that = this
if (event.scheduleItem) {
let scheduleItem = JSON.parse(event.scheduleItem)
this.setData({
scheduleItem: scheduleItem
})
}
let outlookContact = []
for (let value of this.$store.data.participatorList) {
if (value.platform === 'outlook') {
......@@ -61,14 +38,7 @@ create.Page({
outlookContact: outlookContact,
currentPeople: getApp().globalData.userid
})
observer.register({
notice(scheduleItem) {
_that.setData({
'scheduleItem.scheduleTemplateId': scheduleItem
})
console.log(scheduleItem);
}
})
this.conflictPeople()
},
onShow() {
......@@ -82,27 +52,28 @@ create.Page({
// 添加email
addEmail() {
let reg = /^\w+((.\w+)|(-\w+))@[A-Za-z0-9]+((.|-)[A-Za-z0-9]+).[A-Za-z0-9]+$/
if (reg.test(this.data.value)) {
let outlookContact = this.data.outlookContact
outlookContact.push({
userId: this.data.value,
username: this.data.value,
headUrl: '',
platform: 'outlook'
})
outlookContact = this.setArrary(outlookContact)
this.setData({
value: '',
outlookContact: outlookContact
})
this.conflictPeople()
}
else if (!!this.data.value) { }
else {
dd.alert({
content: '请输入正确的邮箱格式',
buttonText: '确定'
})
if (!!this.data.value) {
if (reg.test(this.data.value)) {
let outlookContact = this.data.outlookContact
outlookContact.push({
userId: this.data.value,
username: this.data.value,
headUrl: '',
platform: 'outlook'
})
outlookContact = this.setArrary(outlookContact)
this.setData({
value: '',
outlookContact: outlookContact
})
this.conflictPeople()
}
else {
dd.alert({
content: '请输入正确的邮箱格式',
buttonText: '确定'
})
}
}
},
// 关闭
......@@ -128,50 +99,37 @@ create.Page({
}
return Object.values(containt)
},
// 创建的时候保存
createSave() {
dd.navigateBack({
delta: 1
})
},
// 编辑的时候保存
editSave() {
this.$store.data.updateInfo.isUpate = true
this.$store.data.updateInfo.updateType = 'operate_user'
this.update()
dd.navigateBack({
delta: 1
})
},
// 保存
save() {
// concat 拼接后生成新的数组 push 返回的是长度
let participatorList = []
let participatorListId = []
for (let value of this.$store.data.participatorList) {
if (value.platform !== 'outlook') {
participatorList.push(value)
participatorListId.push(value.userId)
}
this.$store.data.participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' })
this.$store.data.participatorUserId.push(getApp().globalData.userid)
for (let value of this.data.outlookContact) {
this.$store.data.participatorList.push(value)
this.$store.data.participatorUserId.push(value.userId)
}
participatorListId.push(getApp().globalData.userid)
participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' })
participatorList.push(...this.data.outlookContact)
participatorList = this.setArrary(participatorList)
this.data.outlookContact.forEach(item => {
participatorListId.push(item.userId)
})
this.setData({
userList: participatorList,
userListId: [...new Set(participatorListId)]
})
this.$store.data.participatorList = this.setArrary(this.$store.data.participatorList)
this.$store.data.participatorUserId = [...new Set(this.$store.data.participatorUserId)]
this.update()
if (!!this.data.scheduleItem) {
if (this.$store.data.originalData.repeatable === 1) {
this.setData({
'conSelectPopupData.showSelectPopup': true
})
} else {
let addUserList = this.arrayPoor(this.$store.data.originUsers, this.data.userList).addUserList
let deleteUserList = this.arrayPoor(this.$store.data.originUsers, this.data.userList).deleteUserList
let dataUser = {
addUserList: addUserList,
deleteUserList: deleteUserList,
modifyModel: 'only',
modifyContent: 'operate_user'
}
this.modifySchedule(dataUser)
}
this.editSave()
} else {
this.$store.data.participatorList = participatorList
this.update()
dd.navigateBack({
delta: 1
})
this.createSave()
}
},
// 选择弹窗
......@@ -182,86 +140,12 @@ create.Page({
'centerPopup.showCenterPopup': true
})
},
// 选择发不发通知
onSelectSend(event) {
this.setData({
'centerPopup.showCenterPopup': false
})
if (event.currentTarget.dataset.item.id > -1) {
let addUserList = this.arrayPoor(this.$store.data.originUsers, this.data.userList).addUserList
let deleteUserList = this.arrayPoor(this.$store.data.originUsers, this.data.userList).deleteUserList
let dataUser = {
addUserList: addUserList,
deleteUserList: deleteUserList,
modifyModel: this.data.conSelectPopupData.selectPopupId,
modifyContent: 'operate_user'
}
this.modifySchedule(dataUser, event.currentTarget.dataset.item.id)
} else {
this.operateUserE(false)
}
},
// toast 消失之后的回调
onToastHidden() {
this.setData({
'conToastData.showToast': false
})
},
// 保存编辑
modifySchedule(data, needNotice = 0) {
let obj = {
needNotice: needNotice,
scheduleId: this.data.scheduleItem.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate
}
return new Promise((resolve, rejects) => {
modifySchedule(Object.assign(data, obj)).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.update()
if (this.$store.data.originalData.repeatable === 1) {
observer.notice(res.data.data)
}
this.operateUserS()
return resolve(res)
} else {
this.operateUserE()
return rejects(res)
}
}).catch(err => {
this.operateUserE()
return rejects(err)
})
})
},
// 数组取差值 原先的数组与现在的比较 增加与减少
arrayPoor(origin, now) {
let originMap = new Map()
let nowMap = new Map()
let add = []
let del = []
for (let x of origin) {
originMap.set(x.userId, x)
}
for (let x of now) {
nowMap.set(x.userId, x)
let status1 = originMap.get(x.userId)
if (!status1) {
add.push(x)
}
}
for (let x of origin) {
let status2 = nowMap.get(x.userId)
if (!status2) {
del.push(x)
}
}
return {
addUserList: add,
deleteUserList: del
}
},
// 会议冲突
conflictPeople() {
let userIds = []
......@@ -307,31 +191,10 @@ create.Page({
})
this.operateUserE(false)
},
// 参会人修改成功
operateUserS() {
this.$store.data.participatorList = this.data.userList
this.$store.data.participatorUserId = this.data.userListId
this.$store.data.indexNeedUpdate = true
this.$store.data.originUsers = this.$store.data.participatorList
this.$store.data.originUsersId = this.$store.data.participatorUserId
this.update()
dd.navigateBack({
delta: 1
})
},
// 参会人修改失败
operateUserE(x = true) {
if (x) {
this.setData({
'conToastData.showToast': true,
'conToastData.title': '保存失败'
})
}
},
// 页面卸载
onUnload() {
// 页面被关闭
observer.unregister()
},
}
});
......@@ -28,10 +28,10 @@ page {
}
.conflict {
line-height: 13px;
line-height: 15px;
vertical-align: top;
width: 13px;
height: 13px;
width: 15px;
height: 15px;
position: absolute;
background: #fff;
bottom: 0rpx;
......@@ -85,4 +85,33 @@ page {
.peopleList:last-of-type .info {
border: none
}
.save {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 32rpx;
background: #fff;
position: fixed;
bottom: 0;
}
.button {
font-family: PingFangSC-Regular;
width: 686rpx;
height: 72rpx;
background: #EA0C28;
border-radius: 48rpx;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 72rpx;
}
.tabBarBottom {
height: 68rpx;
width: 100%;
background: #fff;
}
\ No newline at end of file
......@@ -8,7 +8,7 @@
</view>
<view class="info">
<text class="name">{{item.username}}</text>
<text a:if="{{(!scheduleItem || currentPeople === $data.originalData.organizer) ? !(item.userId == currentPeople) : false}}" class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
<text a:if="{{(!scheduleItem || currentPeople === $data.originalData.organizer) ? !(item.userId == currentPeople) : !($data.originUsersId.includes(item.userId)) }}" class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
</view>
</view>
</view>
......@@ -16,10 +16,15 @@
<text class="iconfont iconicon_add "></text>
<text>添加参会人</text>
</view>
<popup title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<!-- 保存 -->
<view class="save" onTap="saveInfo" a:if="{{scheduleItem}}">
<view class="button">
完成
</view>
<view class="tabBarBottom" a:if="{{isIPX}}">
</view>
</view>
<popup title="{{comPopupData.title}}" show="{{comPopupData.popupShow}}" mask="true" onClose="closePopup">
<hlist dataComList="{{comHListData.contactData}}" onSelectComHList="selectComHList"></hlist>
</popup>
<toast showToast="{{conToastData.showToast}}" title="{{conToastData.title}}" onToastHidden="onToastHidden"></toast>
<centerpopup centerPopup="{{centerPopup.showCenterPopup}}" centerPopupList="{{centerPopup.centerPopupList}}" onSelectSend="onSelectSend"></centerpopup>
<selectpopup showSelectPopup="{{conSelectPopupData.showSelectPopup}}" selectPopupList="{{conSelectPopupData.editSaveList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
</view>
\ No newline at end of file
class Store {
data = {
contactPeople: [],
contactPeopleId: []
}
}
export default new Store()
\ No newline at end of file
......@@ -34,15 +34,6 @@ create.Page({
},
onLoad(e) {
if (e.scheduleItem) {
const _that = this
observer.register({
notice(scheduleItem) {
_that.setData({
'scheduleItem.scheduleTemplateId': scheduleItem
})
console.log(scheduleItem);
}
})
this.setData({
repeatable: e.repeatable,
scheduleItem: JSON.parse(e.scheduleItem)
......@@ -65,34 +56,15 @@ create.Page({
selectPlace(event) {
this.$store.data.locationName = event.target.dataset.locationName
this.$store.data.roomId = ''
this.update()
if (!!this.data.scheduleItem) {
if (this.data.repeatable != 0) {
this.setData({
'conSelectPopupData.showSelectPopup': true
})
} else {
let data = {
location: {
longitude: -999,
latitude: -999,
locationName: this.$store.data.locationName
},
meetingRoomId: this.$store.data.roomId,
modifyModel: 'only',
modifyContent: 'modify_location'
}
this.modifySchedule(data, 0).then(res => {
this.editLocationS()
}).catch(err => {
this.editLocationE()
})
if (!!this.data.scheduleItem)
this.$store.data.updateInfo = {
updateType: 'modify_location',
isUpate: true
}
} else {
dd.navigateBack({
delta: 1
})
}
this.update()
dd.navigateBack({
delta: 1
})
},
onSelectPopup(event) {
......@@ -184,34 +156,15 @@ create.Page({
selectMeetingRoom(e) {
this.$store.data.locationName = e.target.dataset.locationName
this.$store.data.roomId = e.target.dataset.locationid
this.update()
if (!!this.data.scheduleItem) {
if (this.data.repeatable != 0) {
this.setData({
'conSelectPopupData.showSelectPopup': true
})
} else {
let data = {
location: {
longitude: -999,
latitude: -999,
locationName: this.$store.data.locationName
},
meetingRoomId: this.$store.data.roomId,
modifyModel: 'only',
modifyContent: 'modify_location'
}
this.modifySchedule(data, 0).then(res => {
this.editLocationS()
}).catch(err => {
this.editLocationE()
})
if (!!this.data.scheduleItem)
this.$store.data.updateInfo = {
updateType: 'modify_location',
isUpate: true
}
} else {
dd.navigateBack({
delta: 1
})
}
this.update()
dd.navigateBack({
delta: 1
})
},
inputPlace(event) {
this.setData({
......
......@@ -224,95 +224,6 @@
font-size: 44rpx;
color: rgba(27, 38, 61, 0.4);
}
.sidebarContent {
background: #FFFFFF;
width: 640rpx;
height: 100%;
padding: 32rpx 0 32rpx 32rpx;
}
.sidebarLogo {
margin-bottom: 18rpx;
line-height: 64rpx;
font-size: 26rpx;
color: rgba(27, 38, 61, .56);
display: flex;
}
.sidebarLogo view:nth-of-type(1) {
margin-right: 34rpx;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: #3070F2;
color: white;
overflow: hidden;
}
.sidebarLogo view:nth-of-type(1) image {
width: 64rpx;
height: 64rpx;
}
.hasAssociated, .unAssociated {
margin-top: 48rpx;
}
.associated {
font-size: 24rpx;
color: rgba(25, 31, 37, .56);
line-height: 34px;
margin-bottom: 16rpx;
}
.applicationList {
height: 104rpx;
display: flex;
align-items: center;
}
.applicationLogo {
width: 72rpx;
height: 72rpx;
margin-right: 24rpx;
}
.applicationMsg {
flex: 1;
display: flex;
border-bottom: 1px solid rgba(241, 243, 249, 1);
height: 104rpx;
align-items: center;
padding-right: 32rpx;
}
.applicationMsg>view:nth-of-type(1) {
flex: 1;
}
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(1) {
font-size: 28rpx;
color: #191F25;
margin-bottom: 8rpx;
}
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(2) {
opacity: 0.56;
font-size: 20rpx;
color: #191F25;
}
.operateIcon {
width: 32rpx;
height: 32rpx;
}
.operateIcon .iconright {
font-size: 22rpx;
color: rgba(27, 38, 61, .5)
}
.year, .month, .week, .date {
height: 96rpx;
font-size: 48rpx;
......
......@@ -10,7 +10,11 @@ class Store {
originUsersId: [],
originalData: null,
indexNeedUpdate: false,
tabBarIndex: '0'
tabBarIndex: '0',
updateInfo: {
updateType: '',
isUpate: false
},
}
}
export default new Store()
\ No newline at end of file
.tabBarBottom {
height: 68rpx;
width: 100%;
background: #fff;
}
\ No newline at end of file
<template name="fullScreen">
<view class="tabBarBottom" a:if="{{isIPX}}">
</view>
</template>
\ No newline at end of file
const iphoneModel = ['iPhone10,3', 'iPhone10,6', 'iPhone11,2', 'iPhone11,4', 'iPhone11,6', 'iPhone11,8', 'iPhone12,1', 'iPhone12,3', 'iPhone12,5']
let fullscren = false
export function checkFullScren() {
let systemInfo = dd.getSystemInfoSync()
if (iphoneModel.includes(systemInfo.model)) {
return true
} else {
return false
}
}
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