Commit 8849b128 by xiexiaoqin

Merge branch 'dev' into release_beta/1.0.0

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