Commit eb14199f by fengzhaoyu

Merge branch 'release/2.0.0' of http://gitlab.roboming.com/fengzhaoyu/schedule into release/2.0.0

parents 6e679745 74e6f574
......@@ -20,11 +20,7 @@ create.Page({
$data: null,
affairLoading: true,
affairList: null, //store,页面用到的变量需要在这里声明
show: false, //pop
oldTask: null,
loading: false,
conToastData: {
showToast: false,
title: '保存成功'
......@@ -79,15 +75,15 @@ create.Page({
onShow() {
this.update()
if (this.store.data.isNeedReloadList) {
this.loadAffairList();
this.setData({
'conToastData.showToast': true,
'conToastData.title': '保存成功',
});
this.$store.data.isIndexAffairListNeedUpdate = true;
this.update();
}
// if (this.store.data.isNeedReloadList) {
// this.loadAffairList();
// this.setData({
// 'conToastData.showToast': true,
// 'conToastData.title': '保存成功',
// });
// this.$store.data.isIndexAffairListNeedUpdate = true;
// this.update();
// }
if (this.$store.data.updateInfo.isUpate) {
if (this.$store.data.updateInfo.updateType === "modify_location") {
......@@ -110,20 +106,15 @@ create.Page({
}
},
onLoad(event) {
event.scheduleItem = decodeURIComponent(event.scheduleItem);
const scheduleItem = JSON.parse(decodeURIComponent(event.scheduleItem));
this.reset()
dd.setNavigationBar({
title: `会议详情`
})
this.setData({
isIPX: checkFullScren(),
placeholder: `${getApp().globalData.name}创建的会议`,
scheduleItem: JSON.parse(event.scheduleItem),
scheduleItem,
currentPeople: getApp().globalData.userid
})
this.getDetail()
let scheduleItem = this.data.scheduleItem
this.getDetail();
const _that = this
observer.register({
notice(scheduleItem) {
......@@ -908,188 +899,18 @@ create.Page({
})
},
// 初始化
reset() {
this.$store.resetEditData()
this.store.data.affairList = [];
},
// toast 消失之后的回调
onToastHidden() {
this.setData({
'conToastData.showToast': false
})
},
// onSelectPopup 选择完的回调
onSelectPopup(event) {
const _that = this
switch (this.data.conSelectPopupData.selectType) {
case 'common':
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)
}
break
case 'noParticipateStatus':
let data1 = {
scheduleId: this.data.scheduleItem.id,
type: event.currentTarget.dataset.item.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate,
value: 0
}
isParticipate(data1).then(res => {
if (res.data.code === 0) {
this.setData({
confirmAttendance: 0
})
this.conflictPeople()
if (data1.type === 'only') {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: 0 })
}
} else {
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
}
}
}
})
break
case 'participateStatus':
let data = {
scheduleId: this.data.scheduleItem.id,
type: event.currentTarget.dataset.item.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate,
value: 1
}
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.setData({
aheadTimes: [15],
'comListData.aheadTimesListId': [15],
confirmAttendance: 1
})
// this.conflictPeople()
if (data.type === 'only') {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: 1 })
}
} else {
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
}
}
}
})
break
case 'delSheudle':
dd.confirm({
title: '删除会议',
content: '确认删除会议吗?',
confirmButtonText: '确定',
cancelButtonText: '取消',
success: (success) => {
if (!!success.confirm) {
dd.showLoading({
content: '正在删除...',
});
let data = {
scheduleId: this.data.scheduleItem.id,
identify: this.data.organizer === getApp().globalData.userid ? 'major' : 'identify',
deleteModel: event.currentTarget.dataset.item.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate
}
deleteSchedule(data).then(async () => {
if (this.$store.modifyErpeatMeeting) {
await this.$store.modifyErpeatMeeting()
}
_that.$store.data.isIndexAffairListNeedUpdate = true;
_that.update()
dd.hideLoading()
dd.navigateBack({
delta: 1
})
})
}
}
})
break
}
this.setData({
'conSelectPopupData.showSelectPopup': false,
'conSelectPopupData.selectPopupId': event.currentTarget.dataset.item.id
})
},
// 选择发不发通知
onSelectSend(event) {
if (event.currentTarget.dataset.item.id > -1) {
if (this.$store.data.originalData.repeatable === 1) {
this.isChange(this.data.editType, this.data.conSelectPopupData.selectPopupId, event.currentTarget.dataset.item.id)
} else {
this.isChange(this.data.editType, 'only', event.currentTarget.dataset.item.id)
}
} else {
switch (this.data.editType) {
case 'operate_user':
this.reSetUsers()
break;
case 'modify_location':
this.reSetLocation()
break;
case 'modify_time':
this.reSetTime()
break;
}
}
this.setData({
'centerPopup.showCenterPopup': false
})
},
// onSelectPopupCancel 点击取消
onSelectPopupCancel() {
this.setData({
'conSelectPopupData.showSelectPopup': false
})
switch (this.data.editType) {
case 'modify_time':
this.reSetTime()
break
case 'modify_location':
this.reSetLocation()
this.$store.data.updateInfo = {
isUpate: false,
updateType: ''
}
break
case 'operate_user':
this.reSetUsers()
this.$store.data.updateInfo = {
isUpate: false,
updateType: ''
}
break
case 'repeat':
this.reSetRepeat()
break
}
},
// 页面卸载
onUnload() {
// 页面被关闭
......@@ -1252,12 +1073,6 @@ create.Page({
dd.pageScrollTo({
scrollTop: 0
})
// 停留一会再挪上去
// setTimeout(() => {
// this.store.data.affairList.splice(index, 1);
// this.store.data.affairList.unshift(changeData);
// this.update();
// }, 1000)
}
this.update();
}
......
{
"pullRefresh": false,
"title": "会议详情",
"usingComponents": {
"popup": "../../components/popup/index",
"task-list": "../../components/taskList/taskList",
......
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