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