Commit 8849b128 by xiexiaoqin

Merge branch 'dev' into release_beta/1.0.0

parents f3005d09 a47abc9e
......@@ -86,7 +86,7 @@
</view>
<view>{{item.hasDateLabel}}</view>
</view>
<view class="scheduleBox {{item.value.isBeOverdue ? 'overdue' : item.value.confirmAttendance === 0 ? 'cancel' : ''}}" data-item="{{item.value}}" data-index="{{index}}" onTap="nextDetail">
<view class="scheduleBox {{item.value.isBeOverdue ? 'overdue' : item.value.confirmAttendance === 0 ? 'cancel' : ''}}" data-item="{{item.value}}" onTap="nextDetail">
<view class="scheduleTitle">
<text>{{item.value.title}}{{item.value.isDaySpan ? `(第${item.value.isFewDays}天,共${item.value.duration}天)` : '' }}</text>
</view>
......
......@@ -130,18 +130,20 @@ create.Page({
//修改会议,除单次会议修改成重复会议
async modifyOnceMeetingContent(content) {
await this.getData(true);
const scheduleListIndex = `scheduleList[${this.data.scheduleListIndex}].value`;
const item = this.data.scheduleList[this.data.scheduleListIndex].value
//修改数据源
for (let i = 0; i < this.data.scheduleList.length; i++) {
if (typeof this.data.scheduleList[i].value !== 'string') {
if (this.data.scheduleList[i].value.id === content.id) {
this.setData({
[scheduleListIndex]: {
...item,
...content
[`scheduleList[${i}].value`]: { ...this.data.scheduleList[i].value, ...content }
})
break;
}
}
}
});
for (let i = 0; i < this.scheduleList.length; i++) {
if (typeof this.scheduleList[i].value !== 'string') {
if (this.scheduleList[i].value.id === item.id) {
if (this.scheduleList[i].value.id === content.id) {
this.scheduleList[i].value = { ...this.scheduleList[i].value, ...content };
break;
}
......@@ -794,12 +796,7 @@ create.Page({
dd.navigateTo({ url: "./../createMeeting/createMeeting" });
},
nextDetail: throttle(function (e) {
const { item, index } = e.target.dataset;
if (index) {
this.setData({
scheduleListIndex: index
})
}
const { item } = e.target.dataset;
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(
JSON.stringify(item)
......
......@@ -758,7 +758,7 @@ create.Page({
this.conflictPeople()
if (data1.type === 'only') {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ confirmAttendance: 0 })
this.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: 0 })
}
} else {
if (this.$store.modifyErpeatMeeting) {
......@@ -786,7 +786,7 @@ create.Page({
this.conflictPeople()
if (data.type === 'only') {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ confirmAttendance: 1 })
this.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: 1 })
}
} else {
if (this.$store.modifyErpeatMeeting) {
......@@ -804,6 +804,9 @@ create.Page({
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',
......@@ -929,6 +932,7 @@ create.Page({
if (this.data.repeatable == 0) {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({
id: this.data.scheduleItem.id,
title: this.data.title
})
}
......@@ -1241,6 +1245,9 @@ create.Page({
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',
......@@ -1284,7 +1291,7 @@ create.Page({
})
this.conflictPeople()
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ confirmAttendance: 1 })
this.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: 1 })
}
}
})
......@@ -1310,7 +1317,7 @@ create.Page({
})
this.conflictPeople()
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ confirmAttendance: 0 })
this.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: 0 })
}
}
})
......@@ -1342,7 +1349,7 @@ create.Page({
}
} else {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ confirmAttendance: -9 })
this.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: -9 })
}
}
......
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