Commit 166ed587 by xiexiaoqin

conflit

parents d4e6ea06 bb08e258
......@@ -35,6 +35,7 @@ export default function http(data) {
login().then(res => {
const { oapiUser } = res.data.data;
getApp().globalData.token = res.data.data.accessToken.access_token;
// getApp().globalData.token = 'd2563d3a-7723-4f76-ad04-005815893328';
getApp().globalData.name = res.data.data.oapiUser.name;
getApp().globalData.userid = res.data.data.oapiUser.userid;
getApp().globalData.avatar = res.data.data.oapiUser.avatar;
......
const app = getApp();
import $http from "./http";
import $binding from "./binding";
// 获取创建会议室的会议室列表
export function getMeetingRoom(data) {
return $http({
method: "get",
data: data,
url: "/meet/meeting-room/page"
});
}
// 获取会议室分类
// 办公区域
// OFFICE_LOCATION(0,"meeting_room_location")
// 会议室设施
// OFFICE_FACILITY(1,"meeting_room_facility")
// 会议室分类
// OFFICE_CATEGORY(2,"meeting_room_category")
export function getLabelTree(data) {
return $http({
method: "get",
data: data,
url: "/admin/label/tree"
});
}
// 更新办公区域,设施,分类
export function getMettingRoomLabelUpdate(data) {
return $http({
method: "POST",
data: JSON.stringify(data),
url: "/admin/label/update"
});
}
// 添加办公区域、会议室分类、会议室设置
export function getMettingRoomLabelSave(data) {
return $http({
method: "POST",
data: JSON.stringify(data),
url: "/admin/label/save"
});
}
// 删除办公区域、会议室分类、会议室设置
export function getMettingRoomLabelRemove(data) {
return $http({
method: "get",
data: data,
url: `/admin/label/remove/${data}`
});
}
// 删除会议室
export function getRemoveMeetingRoom(data) {
return $http({
method: "get",
data: "",
url: `/meet/meeting-room/remove/${data}`
});
}
// 创建会议室
export function saveMettingRoom(data) {
return $http({
method: "post",
data: JSON.stringify(data),
url: "/meet/meeting-room/save"
});
}
// 修改会议室
export function mettingRoomUpdate(data) {
return $http({
method: "post",
data: JSON.stringify(data),
url: "/meet/meeting-room/update"
});
}
// 获取会议室详情
export function getMeetingRoomVOByUuid(data) {
return $http({
method: "get",
data: "",
url: `/meet/meeting-room/getMeetingRoomVOByUuid/${data}`
});
}
// 获取我的会议
export function myMeetingPage(data) {
return $http({
method: "post",
data: JSON.stringify(data),
url: "/meet/meeting/myPage"
});
}
// 获取预定会议室列表
export function getReserveRoomList(data) {
return $http({
......@@ -97,24 +11,6 @@ export function getReserveRoomList(data) {
});
}
// 获取预定会议详情
export function getMyMeetingDetails(data) {
return $http({
method: "get",
data: "",
url: `/meet/meeting/${data}`
});
}
// 修改预定时间设置
export function updateGlobalSetting(data) {
return $http({
method: "post",
data: JSON.stringify(data),
url: `/meet/meeting-global-setting/update`
});
}
// 获取首页信息
export function getHomeUserSchedule(data) {
return $http({
......@@ -318,3 +214,12 @@ export function getThirdUserPlatForm(data) {
url: `/admin/third/user/getThirdUserPlatForm`
});
}
// 解绑第三方app
export function unbindingApp(data) {
return $http({
method: "get",
data: "",
url: `/admin/third/user/remove/${data}`
});
}
......@@ -6,4 +6,8 @@ page {
view {
box-sizing: border-box;
}
.addPaddingBottom {
padding-bottom: 68rpx;
}
\ No newline at end of file
import { setGlobalStore } from 'dd-store';
import exampleStore from './stores/exampleStore'
import { checkFullScren } from "./utils/checkFullScren";
setGlobalStore(exampleStore);
App({
......@@ -7,6 +8,7 @@ App({
// 第一次打开
// options.query == {number:1}
// console.info('App onLaunch');
this.globalData.isFullScren = checkFullScren
},
onShow(options) {
// 从后台被 scheme 重新打开
......@@ -14,6 +16,7 @@ App({
},
globalData: {
isFullScren: false,
loading: false,
token: '',
avatar: '',
......
......@@ -11,7 +11,7 @@
<view class="applicationList" a:for="{{relatedAppList}}" a:if="{{item.platform !== 'dingTalk'}}">
<view class="applicationLogo {{item.platform}}">
</view>
<view class="applicationMsg">
<view class="applicationMsg" data-item="{{item}}" catchTap="toAppDetails">
<view>
<view>
{{item.thirdUserIdentify}}
......@@ -26,14 +26,14 @@
</view>
</view>
</view>
<view class="unAssociated">
<view class="unAssociated" a:if="{{relatedAppList.length !== 3}}">
<view class="associated">
可关联应用
</view>
<view class="applicationList" a:if="{{relatedAppPlatformList.indexOf('outlook') === -1}}">
<view class="applicationLogo outlook">
</view>
<view class="applicationMsg" catchTap="bindingOutlook">
<view class="applicationMsg" data-platform="outlook" catchTap="bindingOutlook">
<view>
<view>
Outlook日历
......
import { getThirdUserPlatForm } from "../../api/request";
import { throttle } from "../../utils/utils";
import create from "dd-store";
create.Component({
mixins: [],
......@@ -13,18 +14,34 @@ create.Component({
this.setData({
userInfo: JSON.parse(getApp().globalData.userInfo)
});
this.getDate();
this.getData();
},
didUpdate() {
if (this.$store.data.relatedAppNeedUpdate) {
this.$store.data.relatedAppNeedUpdate = false;
if (typeof this.$store.data.relatedAppNeedUpdate === "object") {
let relatedAppList = this.data.relatedAppList;
let relatedAppPlatformList = this.data.relatedAppPlatformList;
relatedAppList.push({
thirdUserIdentify: this.$store.data.relatedAppNeedUpdate.name,
platform: this.$store.data.relatedAppNeedUpdate.platform
});
relatedAppPlatformList.push(
this.$store.data.relatedAppNeedUpdate.platform
);
this.setData({
relatedAppList: relatedAppList,
relatedAppPlatformList: relatedAppPlatformList
});
this.$store.data.relatedAppNeedUpdate = "";
this.update();
} else if (this.$store.data.relatedAppNeedUpdate === "1") {
this.$store.data.relatedAppNeedUpdate = "";
this.update();
this.getDate();
this.getData();
}
},
didUnmount() {},
methods: {
getDate() {
getData() {
getThirdUserPlatForm().then(res => {
let relatedAppPlatformList = [];
res.data.data.forEach(item => {
......@@ -32,15 +49,24 @@ create.Component({
});
this.setData({
relatedAppList: res.data.data,
relatedAppPlatformList: relatedAppPlatformList
relatedAppPlatformList: res.data.data.map(it => it.platform)
});
});
},
preventSort() {
return false;
},
bindingOutlook() {
dd.navigateTo({ url: "./../bindingOutlook/bindingOutlook" });
bindingOutlook(e) {
dd.navigateTo({
url: `./../bindingOutlook/bindingOutlook?platform=${e.target.dataset.platform}`
});
},
toAppDetails(e) {
dd.navigateTo({
url: `./../outlookDetails/outlookDetails?item=${JSON.stringify(
e.target.dataset.item
)}`
});
}
}
});
......@@ -59,7 +59,7 @@
}
.fake-name {
height: 40rpx;
height: 48rpx;
}
.name {
......@@ -69,6 +69,7 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
height: 40rpx;
}
.error {
......
......@@ -4,7 +4,7 @@ Component({
},
props: {
showToast: false,
duration: 1000,
duration: 2000,
title: '保存成功',
toastIcon: 'iconcanjia3'
......
......@@ -6,9 +6,13 @@ import create from "dd-store";
create.Page({
data: {
$data: null,
url: ""
url: "",
platform: ''
},
onLoad() {
onLoad(e) {
this.setData({
platform: e.platform
})
this.webViewContext = dd.createWebViewContext("web-view-1");
let data = `${getApp().globalData.userid},${dd.corpId}`;
getOutlookUrl(data).then(res => {
......@@ -26,7 +30,10 @@ create.Page({
};
authorizationCodeReplacementToken(data).then(res => {
if (res.data.data) {
this.$store.data.relatedAppNeedUpdate = true;
this.$store.data.relatedAppNeedUpdate = {
name: res.data.data,
platform: this.data.platform
}
this.update();
dd.navigateBack({
delta: 1
......
......@@ -106,13 +106,7 @@ create.Page({
},
// 初始化
reset() {
this.$store.data.indexNeedUpdate = false;
this.$store.data.roomId = ''
this.$store.data.participatorList = []
this.$store.data.participatorUserId = []
this.$store.data.originUsers = []
this.$store.data.originUsersId = []
this.$store.data.locationName = ''
this.$store.resetData()
this.$store.data.startTime = this.getTimes()
this.$store.data.endTime = this.getTimes(new Date().setMinutes(new Date().getMinutes() + 30))
this.update()
......
.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" });
}
});
......@@ -139,6 +139,8 @@ page {
}
.icon {
width: 36rpx;
height: 100%;
vertical-align: middle;
color: #0a0a0a;
font-size: 36rpx;
......@@ -150,7 +152,7 @@ input {
caret-color: #3070F2;
padding-left: 0;
height: 52rpx;
line-height: 52rpx;
/* line-height: 52rpx; */
}
.createTitle {
......@@ -239,7 +241,7 @@ input {
.close {
font-size: 32rpx;
color: rgba(10, 10, 10, 0.3)
color: rgba(10, 10, 10, 0.3)!important;
}
.repeatModal {
......@@ -592,4 +594,17 @@ input {
height: 68rpx;
width: 100%;
background: #fff;
}
.iconicon_description1 {
color: rgba(10, 10, 10, 0.4)!important;
}
.iconright {
font-size: 30rpx;
color: rgba(10, 10, 10, 0.3)!important;
}
.addPadding {
padding-bottom: 270rpx;
}
\ No newline at end of file
......@@ -95,7 +95,7 @@
{{$data.participatorList.length}}位参会人
</view>
<view class="conflictStatus" a:if="{{conflictPeople.length}}">
{{conflictPeople.length}}人会议安排冲突
{{conflictPeople.length}}人日程安排冲突
</view>
</view>
<view class="iconright iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
......@@ -202,7 +202,7 @@
<!-- 动态列表 -->
<import src="../../template/avater/index.axml"/>
<import src="../../template/affairBlank/index.axml"/>
<view class="affair-list {{isExpand? '' : 'affair-list-margin-top'}}" onTap="hideFileOperate">
<view class="affair-list {{isExpand? '' : 'affair-list-margin-top'}} {{!isExpand&&$data.participatorList.length>1 ? 'addPadding' : ''}}" onTap="hideFileOperate">
<view a:if="{{!isExpand}}" class="affair-list-title">会议动态</view>
<block a:if="{{!affairLoading}}">
<block a:for="{{affairList}}">
......
......@@ -28,7 +28,7 @@ create.Page({
{ id: 1, text: '每天', icon: '', repeatable: 1, recurrenceModel: { model: 'daily', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: null } },
{ id: 2, text: '每周', icon: '', repeatable: 1, recurrenceModel: { model: 'weekly', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: ['MO'] } },
{ id: 3, text: '每周的工作日', icon: '', repeatable: 1, recurrenceModel: { model: 'weekly', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: ['MO', 'TU', 'WE', 'TH', 'FR'] } },
{ id: 4, text: '每月', icon: '', repeatable: 1, recurrenceModel: { model: 'absoluteMonthly', daysOfMonth: ['23'], interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: null } }
{ id: 4, text: '每月', icon: '', repeatable: 1, recurrenceModel: { model: 'absolute_Monthly', daysOfMonth: ['23'], interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: null } }
],
meetingWayList: [
{ id: 0, text: 'Zoom Meeting', imageUrl: '../../assests/Zoom.png', meetingWayModel: { model: 'zoom' } },
......@@ -181,7 +181,7 @@ create.Page({
}
},
onLoad(event) {
console.log(event)
event.scheduleItem = decodeURIComponent(event.scheduleItem);
this.reset()
dd.setNavigationBar({
title: `会议详情`
......@@ -328,21 +328,7 @@ create.Page({
},
// 初始化
reset() {
this.$store.data.indexNeedUpdate = false;
this.$store.data.roomId = ''
this.$store.data.participatorList = []
this.$store.data.originUsers = []
this.$store.data.originUsersId = []
this.$store.data.participatorList = []
this.$store.data.participatorUserId = []
this.$store.data.locationName = ''
this.$store.data.updateInfo = {
updateType: '',
isUpate: false
}
this.$store.data.startTime = this.getTimes()
this.$store.data.endTime = this.getTimes(new Date(this.getTimes()).setMinutes(new Date(this.$store.data.startTime).getMinutes() + 120))
this.update()
this.$store.resetEditData()
this.resetRepeatList()
this.acrossDay(this.$store.data.startTime, this.$store.data.endTime)
},
......@@ -352,12 +338,12 @@ create.Page({
case 'location':
this.$store.data.updateInfo.updateType = 'modify_location'
this.update()
dd.navigateTo({ url: `./../place/place?scheduleItem=${JSON.stringify(this.data.scheduleItem)}&repeatable=${this.data.repeatable}` })
dd.navigateTo({ url: `./../place/place?scheduleItem=${encodeURIComponent(JSON.stringify(this.data.scheduleItem))}&repeatable=${this.data.repeatable}` })
break
case 'participantsDetail':
this.$store.data.updateInfo.updateType = 'operate_user'
this.update()
dd.navigateTo({ url: `./../participantsDetail/participantsDetail?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` })
dd.navigateTo({ url: `./../participantsDetail/participantsDetail?scheduleItem=${encodeURIComponent(JSON.stringify(this.data.scheduleItem))}` })
break
}
},
......@@ -850,8 +836,8 @@ create.Page({
},
// 重置时间
reSetTime() {
this.$store.data.startTime = this.$store.data.originalData.startTime.replace(/'-'/g, '/')
this.$store.data.endTime = this.$store.data.originalData.endTime.replace(/'-'/g, '/')
this.$store.data.startTime = this.$store.data.originalData.startTime.replace(/-/g, "/")
this.$store.data.endTime = this.$store.data.originalData.endTime.replace(/-/g, "/")
this.update()
this.setData({
week: this.data.weekList[new Date(this.$store.data.originalData.startTime).getDay()],
......@@ -860,7 +846,7 @@ create.Page({
// 重置地点
reSetLocation() {
this.$store.data.locationName = this.$store.data.originalData.location.locationName
this.$store.data.roomId = this.$store.data.originalData.meetingRoomId
this.$store.data.roomId = this.$store.data.originalData.meetingRoomId === -1 ? '' : this.$store.data.originalData.meetingRoomId
this.update()
},
// 重置人物
......@@ -989,6 +975,7 @@ create.Page({
recurrenceModel: this.$store.data.originalData.repeatable ? { model: this.storer.data.originalData.recurrenceModel.model, daysOfMonth: this.$store.data.originalData.recurrenceModel.daysOfMonth, interval: 1, initialTime: this.$store.data.originalData.recurrenceModel.initialTime, terminateTime: this.$store.data.originalData.recurrenceModel.terminateTime, weekDayList: this.$store.data.originalData.recurrenceModel.weekDayList } : { model: 'no_repeat' }
})
}).then(res => {
observer.notice(res.data.data)
this.$store.data.originalData.recurrenceModel = this.data.recurrenceModel
this.$store.data.originalData.repeatable = this.data.repeatable
this.update()
......@@ -1045,7 +1032,7 @@ create.Page({
latitude: '-999',
locationName: this.$store.data.locationName
},
meetingRoomId: this.$store.data.roomId
meetingRoomId: !!this.$store.data.roomId ? this.$store.data.roomId : -1
}
this.modifySchedule(dataLocation, needNotice).catch(err => {
this.$store.data.locationName = this.$store.data.originalData.location.locationName
......@@ -1105,7 +1092,7 @@ create.Page({
recurrenceModel: this.data.comListData.repeatList[2].recurrenceModel
})
})
} else if (this.data.recurrenceModel.model === 'absoluteMonthly') {
} else if (this.data.recurrenceModel.model === 'absolute_Monthly') {
let dataRepeat5 = {
startTime: this.$store.data.startTime.replace(/\//g, "-"),
endTime: this.$store.data.endTime.replace(/\//g, "-"),
......
import {
getMeetingRoom,
myMeetingPage,
getReserveRoomList,
getAllScheduleWithMeetingRoomByTime
} from "../../api/request";
......
import { getUserScheduleInTime } from '../../api/request.js'
import { throttle } from './../../utils/utils.js'
import pageStore from '../participantsDetail/store';
import create from 'dd-store'
// 传递给组件toast的所有数据
const conToastData = {
showToast: false,
title: '保存成功'
title: '邮箱格式错误'
}
create.Page({
store: pageStore,
useAll: true,
data: {
$data: null,
outlookContact: [],
......@@ -17,19 +19,32 @@ create.Page({
conToastData: conToastData,
currentPeople: '',
value: '',
toPage: ''
},
onLoad(event) {
const _that = this
if (event.scheduleItem) {
event.scheduleItem = decodeURIComponent(event.scheduleItem)
let scheduleItem = JSON.parse(event.scheduleItem)
this.setData({
scheduleItem: scheduleItem
})
}
if (event.toPage) {
this.setData({
toPage: event.toPage
})
}
let outlookContact = []
for (let value of this.$store.data.participatorList) {
let userList = []
if (!this.data.scheduleItem || !this.data.toPage) {
userList = this.$store.data.participatorList
} else {
userList = this.store.data.contactPeople
}
for (let value of userList) {
if (value.platform === 'outlook') {
outlookContact.push(value)
}
......@@ -51,7 +66,7 @@ create.Page({
},
// 添加email
addEmail() {
let reg = /^\w+((.\w+)|(-\w+))@[A-Za-z0-9]+((.|-)[A-Za-z0-9]+).[A-Za-z0-9]+$/
let reg = /^(?!.* )\w+((.\w+)|(-\w+))@[A-Za-z0-9]+((.|-)[A-Za-z0-9]+).[A-Za-z0-9]+$/
if (!!this.data.value) {
if (reg.test(this.data.value)) {
let outlookContact = this.data.outlookContact
......@@ -69,9 +84,8 @@ create.Page({
this.conflictPeople()
}
else {
dd.alert({
content: '请输入正确的邮箱格式',
buttonText: '确定'
this.setData({
'conToastData.showToast': true
})
}
}
......@@ -99,38 +113,38 @@ 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() {
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)
let userList = []
let userId = []
userList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' })
userId.push(getApp().globalData.userid)
for (let value of this.data.outlookContact) {
this.$store.data.participatorList.push(value)
this.$store.data.participatorUserId.push(value.userId)
userList.push(value)
userId.push(value.userId)
}
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) {
this.editSave()
userList = this.setArrary(userList)
userId = [...new Set(userId)]
if (!this.data.scheduleItem || !this.data.toPage) {
this.$store.data.participatorList.push(...userList)
this.$store.data.participatorUserId.push(...userId)
this.$store.data.participatorList = this.setArrary(this.$store.data.participatorList)
this.$store.data.participatorUserId = [...new Set(this.$store.data.participatorUserId)]
} else {
this.createSave()
this.store.data.contactPeople.push(...userList)
this.store.data.contactPeopleId.push(...userId)
this.store.data.contactPeople = this.setArrary(this.store.data.contactPeople)
this.store.data.contactPeopleId = [...new Set(this.store.data.userId)]
if (this.store.data.contactPeople != this.$store.data.originalData.userList) {
this.$store.data.updateInfo.isUpate = true
this.$store.data.updateInfo.updateType = 'operate_user'
}
}
this.update()
dd.navigateBack({
delta: 1
})
},
// 选择弹窗
onSelectPopup(event) {
......
.relatedAppPage {
height: 100vh;
background: #FFFFFF;
}
.platformMsg {
display: flex;
padding: 34rpx 32rpx;
align-items: center;
}
.platformImg {
width: 60rpx;
height: 60rpx;
margin-right: 24rpx;
}
.outlook {
background: url(../../assests/outlookLogo.png) center /100% 100%;
}
.zoom {
background: url(../../assests/zoomLogo.png) center /100% 100%;
}
.unBinding {
width: 686rpx;
height: 96rpx;
margin: 22rpx auto;
border-radius: 48rpx;
border: 2rpx solid rgba(222, 222, 222, 1);
text-align: center;
line-height: 0.96rem;
font-size: 34rpx;
color: rgba(242, 86, 67, 1);
}
\ No newline at end of file
<view>
New Page
<view class="relatedAppPage">
<view class="platformMsg" a:if="{{item.platform === 'outlook'}}">
<view class="platformImg {{item.platform}}">
</view>
<view class="platformName">
{{item.thirdUserIdentify}}
</view>
</view>
<view class="platformMsg" a:if="{{item.platform === 'zoom'}}">
<view class="platformImg {{item.platform}}">
</view>
<view class="platformName">
{{item.thirdUserIdentify}}
</view>
</view>
<view class="unBinding" onTap="unbind">
取消关联
</view>
</view>
\ No newline at end of file
import {} from "../../api/request";
import { unbindingApp } from "../../api/request";
import create from "dd-store";
create.Page({
data: {
$data: null,
item: ""
},
onLoad() {},
onLoad(e) {
this.setData({
item: JSON.parse(e.item)
});
},
unbind() {
unbindingApp(this.data.item.platform).then(res => {
if (res.data.data) {
this.$store.data.relatedAppNeedUpdate = "1";
this.update();
dd.navigateBack({
delta: 1
});
}
});
}
});
......@@ -59,7 +59,7 @@ page {
.close {
position: absolute;
right: 32rpx;
color: #8E939D;
color: rgba(10, 10, 10, 0.3);
font-size: 0.3rem;
}
......
<view class="participantsDetail">
<view class="peopleContaint">
<view class="peopleList" a:for="{{$data.participatorList}}" a:for-item="item">
<view class="peopleList" a:for="{{!!scheduleItem ? contactPeople : $data.participatorList}}" a:for-item="item">
<view class="headImg">
<image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/>
<text a:else>{{item.username.substring(0, 1)}}</text>
......
import create from 'dd-store'
import pageStore from './store';
import { checkFullScren } from "../../utils/checkFullScren";
import { modifySchedule, addSchedule, getUserScheduleInTime, getHomeUserSchedule } from '../../api/request.js'
// 传给组件 hList 水平排列 所有数据 comHListData
......@@ -18,8 +17,9 @@ const comPopupData = {
popupShow: false
}
create.Page({
store: pageStore,
useAll: true,
data: {
store: pageStore,
$data: null,
scheduleItem: '',
conflictPeople: [],
......@@ -27,22 +27,27 @@ create.Page({
currentPeople: '',
comHListData: comHListData,
comPopupData: comPopupData,
isClick: false,
isIPX: false
},
onLoad(event) {
this.reset()
if (event.scheduleItem) {
event.scheduleItem = decodeURIComponent(event.scheduleItem)
let scheduleItem = JSON.parse(event.scheduleItem)
this.setData({
scheduleItem: scheduleItem
})
// for (let value of this.$store.data.participatorList) {
// this.store.data.contactPeople.push(value)
// this.store.data.contactPeopleId.push(value.userId)
// this.update()
// }
}
let contactPeople = []
let contactPeopleId = []
for (let value of this.$store.data.participatorList) {
contactPeople.push(value)
contactPeopleId.push(value.userId)
}
this.store.data.contactPeople = contactPeople
this.store.data.contactPeopleId = contactPeopleId
this.update()
}
this.setData({
isIPX: checkFullScren(),
currentPeople: getApp().globalData.userid
......@@ -51,16 +56,10 @@ create.Page({
},
onShow() {
dd.setNavigationBar({
title: `参会人(${this.$store.data.participatorList.length}人)`
})
this.getParticipatorLength()
this.conflictPeople()
},
// 添加参会人 钉钉选人
// 添加参会人 钉钉选人
addParticipator() {
const _that = this
let require = []
......@@ -71,12 +70,19 @@ create.Page({
outLookConcat.push(participator)
}
}
if (!_that.data.scheduleItem || this.$store.data.originalData.organizer === getApp().globalData.userid) {
console.log(_that.$store.data.participatorUserId)
// 创建的 可选 必选
if (!_that.data.scheduleItem) {
select = _that.$store.data.participatorUserId
require = [getApp().globalData.userid]
} else {
select = _that.$store.data.participatorUserId
}
// 编辑 发起人的可选必选
else if (this.$store.data.originalData.organizer === getApp().globalData.userid) {
select = _that.store.data.contactPeopleId
require = [getApp().globalData.userid]
}
// 编辑 参会人可选必选
else {
select = _that.store.data.contactPeopleId
require = [...this.$store.data.originUsersId]
}
select = _that.selectedelRequired([...require], [...select]).pickedUsers
......@@ -108,10 +114,17 @@ create.Page({
peopleId.push(value.userId)
}
people = _that.setArrary(people.concat(outLookConcat))
_that.$store.data.participatorList = people
_that.$store.data.participatorUserId = peopleId
_that.update()
// 创建
if (!_that.data.scheduleItem) {
_that.$store.data.participatorList = people
_that.$store.data.participatorUserId = peopleId
_that.update()
} else {
_that.store.data.contactPeople = people
_that.store.data.contactPeopleId = peopleId
_that.update()
}
},
fail: function (err) {
}
......@@ -120,35 +133,52 @@ create.Page({
// 删除参会人
delParticipants(event) {
let userId = event.target.dataset.userId
this.$store.data.participatorList.forEach((item, index) => {
let userIdList = []
let userList = []
if (!!this.data.scheduleItem) {
userList = this.store.data.contactPeople
userIdList = this.store.data.contactPeopleId
} else {
userList = this.$store.data.participatorList
userIdList = this.$store.data.participatorUserId
}
userList.forEach((item, index) => {
if (userId === item.userId) {
let people = [...this.$store.data.participatorList]
let people = [...userList]
people.splice(index, 1)
this.$store.data.participatorList = people
if (!!this.data.scheduleItem) {
this.store.data.contactPeople = people
} else {
this.$store.data.participatorList = people
}
this.update()
return
}
})
this.$store.data.participatorUserId.forEach((item, index) => {
userIdList.forEach((item, index) => {
if (userId === item) {
let peopleId = [...this.$store.data.participatorUserId]
let peopleId = [...userIdList]
peopleId.splice(index, 1)
console.log(peopleId)
this.$store.data.participatorUserId = peopleId
if (!!this.data.scheduleItem) {
this.store.data.contactPeopleId = peopleId
} else {
this.$store.data.participatorUserId = peopleId
}
this.update()
return
}
})
this.getParticipatorLength()
this.conflictPeople()
},
// 编辑时候的保存
editSave() {
this.setData({
isClick: true
})
if (this.$store.data.originUsers != this.$store.data.participatorList) {
if (this.$store.data.originUsers != this.store.data.contactPeople) {
this.$store.data.updateInfo.isUpate = true
this.$store.data.updateInfo.updateType = 'operate_user'
this.$store.data.participatorList = this.store.data.contactPeople
this.$store.data.participatorUserId = this.store.data.contactPeopleId
this.update()
}
dd.navigateBack({
......@@ -160,7 +190,21 @@ create.Page({
saveInfo() {
this.editSave()
},
// 获取参会人长度
getParticipatorLength() {
const length = !!this.data.scheduleItem ? this.store.data.contactPeople.length : this.$store.data.participatorList.length
dd.setNavigationBar({
title: `参会人(${length}人)`
})
},
// 重置参会人
reset() {
this.store.data.contactPeople = []
this.store.data.contactPeopleId = []
this.update()
},
// 展示弹窗
showPopup() {
this.setData({
......@@ -189,7 +233,7 @@ create.Page({
this.setData({
'comPopupData.popupShow': false
})
dd.navigateTo({ url: `./../outLookContact/outLookContact?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` })
dd.navigateTo({ url: `./../outLookContact/outLookContact?scheduleItem=${encodeURIComponent(JSON.stringify(this.data.scheduleItem))}&toPage=participantsDetail` })
break;
}
},
......@@ -202,34 +246,6 @@ create.Page({
'centerPopup.showCenterPopup': true
})
},
// 数组取差值 原先的数组与现在的比较 增加与减少
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
}
},
// 数组去重
setArrary(arr, userId) {
console.log(arr)
......@@ -241,8 +257,14 @@ create.Page({
},
// 会议冲突
conflictPeople() {
let users = []
let userIds = []
for (let item of this.$store.data.participatorList) {
if (!!this.data.scheduleItem) {
users = this.store.data.contactPeople
} else {
users = this.$store.data.participatorList
}
for (let item of users) {
userIds.push(item.userId)
}
......@@ -289,20 +311,6 @@ create.Page({
requiredUsers: req,
pickedUsers: pic
}
},
// 页面卸载
onUnload() {
if (this.data.isClick === false && !!this.data.scheduleItem) {
this.reSetPeople()
}
},
// 重置人
reSetPeople() {
this.$store.data.updateInfo.isUpate = false
this.$store.data.updateInfo.updateType = ''
this.$store.data.participatorList = this.$store.data.originUsers
this.$store.data.participatorUserId = this.$store.data.originUsersId
this.update()
}
});
......@@ -34,6 +34,7 @@ create.Page({
},
onLoad(e) {
if (e.scheduleItem) {
e.scheduleItem = decodeURIComponent(e.scheduleItem)
this.setData({
repeatable: e.repeatable,
scheduleItem: JSON.parse(e.scheduleItem)
......
@import "../../template/loading/loading.acss";
@import "../../template/affairBlank/index.acss";
@import "../../template/fullScreen/fullScreen.acss";
.dynamicBox {
width: 100%;
overflow: hidden;
......@@ -289,15 +290,19 @@
background: #Fff;
}
.tabBarContent {
width: 100%;
position: fixed;
left: 0;
bottom: 0;
}
.tabBar {
height: 120rpx;
width: 100%;
background: url('../../assests/tabBarBg.png');
background-size: cover;
display: flex;
position: fixed;
left: 0;
bottom: 0;
padding-top: 4rpx;
/* box-shadow: 0 -4rpx 8rpx 0 rgba(0,0,0,0.04);
border-radius: 0 64rpx 0 64rpx 0 0 0; */
......
<import src="../../template/loading/loading.axml"/>
<import src="../../template/fullScreen/fullScreen.axml"/>
<view hidden="{{$data.tabBarIndex === '1'}}">
<import src="../../template/affairBlank/index.axml"/>
<view class="{{isStopBodyScroll ? 'scroll-lock' : ''}}" onTap="closeSwipe" onTouchStart="closeSwipe" onTouchMove="closeSwipe" onTouchEnd="closeSwipe">
......@@ -119,27 +120,30 @@
<template is="loading" a:else>
</template>
</view>
<view class="tabBar">
<view onTap="changeTabBar" data-tabbar='0' data-title='动态'>
<view class="tabBarView tabBarView1 {{$data.tabBarIndex === '0' ? 'ischooseTabBar' : ''}}">
<view class="iconfont iconicon_dynamic"></view>
<view>动态</view>
<view class="tabBarContent">
<view class="tabBar">
<view onTap="changeTabBar" data-tabbar='0' data-title='动态'>
<view class="tabBarView tabBarView1 {{$data.tabBarIndex === '0' ? 'ischooseTabBar' : ''}}">
<view class="iconfont iconicon_dynamic"></view>
<view>动态</view>
</view>
</view>
</view>
<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">
</text>
<text a:elif="{{offset == 'next'}}" class="iconfont iconicon_days iconicon_Packup">
</text>
<text a:else class="iconfont iconicon_days iconicon_days{{iconDay}}">
</text>
<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">
</text>
<text a:elif="{{offset == 'next'}}" class="iconfont iconicon_days iconicon_Packup">
</text>
<text a:else class="iconfont iconicon_days iconicon_days{{iconDay}}">
</text>
</view>
<view>日程</view>
</view>
<view>日程</view>
</view>
<view class="createMeeting" onTap="createMeeting">
<text class="iconfont iconicon_add1"></text>
</view>
</view>
<view class="createMeeting" onTap="createMeeting">
<text class="iconfont iconicon_add1"></text>
</view>
<template is="fullScreen" data="{{isIPX:isFullscreen}}" />
</view>
\ No newline at end of file
class Store {
data = {
locationName: "",
locationName: '',
participatorList: [],
participatorUserId: [], // 参会人的userId
roomId: "",
startTime: "",
endTime: "",
roomId: '',
startTime: '',
endTime: '',
originUsers: [],
originUsersId: [],
originalData: null,
indexNeedUpdate: false,
relatedAppNeedUpdate: false,
tabBarIndex: "0",
tabBarIndex: '0',
updateInfo: {
updateType: "",
updateType: '',
isUpate: false
},
onceMeetingContent: null,
relatedAppNeedUpdate: false,
}
resetData() {
this.data.indexNeedUpdate = false;
this.data.roomId = ''
this.data.participatorList = []
this.data.participatorUserId = []
this.data.originUsers = []
this.data.originUsersId = []
this.data.locationName = ''
this.data.onceMeetingContent = null
this.update();
}
resetEditData() {
this.data.onceMeetingContent = null
this.data.indexNeedUpdate = false;
this.data.roomId = ''
this.data.participatorList = []
this.data.originUsers = []
this.data.originUsersId = []
this.data.participatorList = []
this.data.participatorUserId = []
this.data.locationName = ''
this.data.updateInfo = {
updateType: '',
isUpate: false
}
};
this.update()
}
}
export default new Store();
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