Commit c74d8633 by xiexiaoqin

Merge branch 'release/1.0.0' of…

Merge branch 'release/1.0.0' of ssh://gitlab.roboming.com:2018/fengzhaoyu/schedule into release/1.0.0
parents 56a35f6f 28fa64f8
import { getInterTime } from '../../utils/utils';
const currentDate = new Date();
const weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const durationList = [{ value: 30, label: '30分钟' }, { value: 60, label: '1小时' }, { value: 120, label: '2小时' }];
const durationList = [{ value: 30, label: '30分钟' }, { value: 60, label: '1小时' }, { value: 90, label: '1.5小时' }, { value: 120, label: '2小时' }];
const timeData = generateDate(365);
const timeHour = generateHour(24);
const timeMin = generateMin(60);
......
......@@ -17,24 +17,8 @@ create.Component({
this.getData();
},
didUpdate() {
if (typeof this.$store.data.relatedAppNeedUpdate === "object") {
let relatedAppList = this.data.relatedAppList;
let relatedAppPlatformList = this.data.relatedAppPlatformList;
relatedAppList.push({
userName: 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 = "";
if (this.$store.data.relatedAppNeedUpdate) {
this.$store.data.relatedAppNeedUpdate = false;
this.update();
this.getData();
}
......
......@@ -4,7 +4,7 @@ Component({
},
props: {
showToast: false,
duration: 2000,
duration: 1000,
title: '保存成功',
toastIcon: 'iconcanjia3'
......
......@@ -21,7 +21,6 @@ create.Page({
selectPopupList: [{ text: "取消关联" }]
},
onLoad(e) {
console.log(e);
this.setData({
platform: e.platform,
name: e.userName,
......@@ -35,7 +34,7 @@ create.Page({
if (requestNum >= 300) {
requestNum = 0;
that.setData({
isBind: true,
isBind: false,
isLoading: false
});
clearInterval(interval);
......@@ -50,10 +49,8 @@ create.Page({
isBind: true,
isLoading: false
});
this.$store.data.relatedAppNeedUpdate = {
name: item.userName,
platform: this.data.platform
};
clearInterval(interval);
this.$store.data.relatedAppNeedUpdate = true;
this.update();
}
});
......@@ -92,9 +89,10 @@ create.Page({
if (res.data.data) {
this.setData({
name: "",
isBind: false
isBind: false,
showSelectPopup: false
});
this.$store.data.relatedAppNeedUpdate = "1";
this.$store.data.relatedAppNeedUpdate = true;
this.update();
}
});
......
......@@ -780,7 +780,7 @@ create.Page({
maxClickCount--;
if (maxClickCount == 0) {
dd.alert({
content: "0.0.7"
content: "0.0.10"
});
maxClickCount = 5;
}
......
......@@ -154,10 +154,14 @@ create.Page({
editType: this.$store.data.updateInfo.updateType
})
} else {
this.setData({
editType: this.$store.data.updateInfo.updateType,
'centerPopup.showCenterPopup': true
})
if (this.$store.data.participatorList.length < 2) {
this.isChange(this.$store.data.updateInfo.updateType, 'only')
} else {
this.setData({
editType: this.$store.data.updateInfo.updateType,
'centerPopup.showCenterPopup': true
})
}
// this.isChange(this.$store.data.updateInfo.updateType, 'only')
}
} else {
......@@ -214,12 +218,6 @@ create.Page({
participatorUserId.push(value.participator.userId)
originUsersId.push(value.participator.userId)
originUsers.push(value.participator)
if (value.userId === getApp().globalData.userid) {
this.setData({
aheadTimes: !!value.aheadList ? value.aheadList : [],
'comListData.aheadTimesListId': !!value.aheadList ? value.aheadList : [-1]
})
}
}
}
for (let item of this.data.comListData.repeatList) {
......@@ -228,6 +226,8 @@ create.Page({
}
}
this.setData({
aheadTimes: !!res.data.data.aheadTimes ? res.data.data.aheadTimes : [],
'comListData.aheadTimesListId': !!res.data.data.aheadTimes ? res.data.data.aheadTimes : [-1],
mrReserveStatus: res.data.data.mrReserveStatus,
confirmAttendance: res.data.data.confirmAttendance === null ? -9 : res.data.data.confirmAttendance,
organizer: res.data.data.organizer,
......@@ -353,10 +353,15 @@ create.Page({
editType: 'modify_location'
})
} else {
this.setData({
editType: 'modify_location',
'centerPopup.showCenterPopup': true
})
if (this.$store.data.participatorList.length < 2) {
this.isChange('modify_location', 'only')
} else {
this.setData({
editType: 'modify_location',
'centerPopup.showCenterPopup': true
})
}
}
break
case 'meetingWayModel':
......@@ -473,7 +478,15 @@ create.Page({
editType: 'repeat'
})
} else {
this.isChange('repeat', 'only')
if (this.$store.data.participatorList.length < 2) {
this.isChange('repeat', 'only')
} else {
this.setData({
editType: 'repeat',
'centerPopup.showCenterPopup': true
})
}
}
break;
}
......@@ -596,10 +609,14 @@ create.Page({
editType: 'modify_time'
})
} else {
this.setData({
editType: 'modify_time',
'centerPopup.showCenterPopup': true
})
if (this.$store.data.participatorList.length < 2) {
this.isChange('modify_time', 'only')
} else {
this.setData({
editType: 'modify_time',
'centerPopup.showCenterPopup': true
})
}
// this.isChange('modify_time', 'only')
}
},
......@@ -706,10 +723,14 @@ create.Page({
const _that = this
switch (this.data.conSelectPopupData.selectType) {
case 'common':
if (this.data.editType === 'modify_location' || this.data.editType === 'modify_time') {
this.setData({
'centerPopup.showCenterPopup': true
})
if (this.data.editType === 'modify_location' || this.data.editType === 'modify_time' || this.data.editType === 'repeat') {
if (this.$store.data.participatorList.length < 2) {
this.isChange(this.data.editType, event.currentTarget.dataset.item.id)
} else {
this.setData({
'centerPopup.showCenterPopup': true
})
}
} else {
this.isChange(this.data.editType, event.currentTarget.dataset.item.id)
}
......@@ -1099,8 +1120,8 @@ create.Page({
}
// this.modifySchedule(data, needNotice)
}).catch(err => {
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.replace(/-/g, "/")).getDay()],
......
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