Commit 74e6f574 by xiexiaoqin

delete: delete old

parent 2cd5a7f8
......@@ -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) {
......@@ -197,79 +188,6 @@ create.Page({
this.update()
this.loadAffairList(res.data.data.groupId);
})
// getScheduleDetail(data).then(res => {
// if (res.data.code === 0) {
// if (!res.data.data.id) {
// console.log('详情接口scheduleId不存在')
// }
// let participatorList = []
// let repeatListMap = new Map()
// for (let value of res.data.data.userList) {
// if (value.participator) {
// participatorList.push({ userId: value.participator.userId, username: value.participator.username, headUrl: value.participator.headUrl, platform: value.participator.platform })
// participatorUserId.push(value.participator.userId)
// originUsersId.push(value.participator.userId)
// originUsers.push({ userId: value.participator.userId, username: value.participator.username, headUrl: value.participator.headUrl, platform: value.participator.platform })
// }
// }
// for (let item of this.data.comListData.repeatList) {
// if (item.recurrenceModel.recurrenceModel !== 'weekly') {
// repeatListMap.set(item.recurrenceModel.model, item.id)
// }
// }
// this.setData({
// id: res.data.data.id,
// currentPeople: getApp().globalData.userid,
// 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,
// organizer: res.data.data.organizer,
// 'comListData.meetingWayModelId': res.data.data.meetingWayModel.model === null ? null : (res.data.data.meetingWayModel.model === 'dingtalk' ? 0 : 1),
// repeatable: res.data.data.repeatable,
// recurrenceModel: res.data.data.repeatable ? { model: res.data.data.recurrenceModel.model, daysOfMonth: res.data.data.recurrenceModel.daysOfMonth, interval: 1, initialTime: res.data.data.recurrenceModel.initialTime, terminateTime: res.data.data.recurrenceModel.terminateTime, weekDayList: res.data.data.recurrenceModel.weekDayList } : { model: 'no_repeat' },
// title: res.data.data.title,
// remark: res.data.data.remark,
// isExpand: res.data.data.confirmAttendance === 1 ? true : false,
// isShowRemark: res.data.data.remark ? true : false,
// week: this.data.weekList[new Date(res.data.data.startTime.replace(/-/g, "/")).getDay()],
// getData: true,
// scheduleItem: res.data.data,
// meetingWayModelData: res.data.data.meetingWayModel
// })
// if (res.data.data.repeatable) {
// this.setData({
// 'comListData.comSelectListId': res.data.data.recurrenceModel.model === 'weekly' ? (res.data.data.recurrenceModel.weekDayList.length > 1 ? 3 : 2) : repeatListMap.get(res.data.data.recurrenceModel.model),
// })
// }
// // this.$store.data.originalData = res.data.data
// // this.$store.data.originUsers = originUsers
// this.$store.data.locationName = res.data.data.location.locationName
// this.$store.data.roomId = res.data.data.meetingRoomId < 0 ? '' : res.data.data.meetingRoomId
// this.$store.data.startTime = res.data.data.startTime.replace(/-/g, "/")
// this.$store.data.endTime = res.data.data.endTime.replace(/-/g, "/")
// this.$store.data.participatorList = participatorList
// this.$store.data.participatorUserId = participatorUserId
// this.$store.data.originUsersId = originUsersId
// this.update()
// this.conflictPeople()
// this.store.data.scheduleId = res.data.data.id;
// this.store.data.groupId = res.data.data.groupId;
// this.update();
// this.loadAffairList();
// this.resetRepeatList()
// // if (res.data.data.meetingWayModel.model === 'zoom' && res.data.data.meetingWayModel.data === null) {
// // setTimeout(() => {
// // getScheduleDetail(data).then(success => {
// // this.setData({
// // meetingWayModelData: res.data.data.meetingWayModel
// // })
// // })
// // }, 30000)
// // }
// }
// })
},
// 添加标题
......@@ -979,188 +897,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() {
// 页面被关闭
......@@ -1323,12 +1071,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