Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
schedule
Commits
12033a9b
Commit
12033a9b
authored
Oct 10, 2020
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会议详情修改
parent
a3b06815
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
754 deletions
+140
-754
createMeeting.axml
pages/createMeeting/createMeeting.axml
+2
-1
createTask.js
pages/createTask/createTask.js
+0
-1
meetingDetail.axml
pages/meetingDetail/meetingDetail.axml
+5
-1
meetingDetail.js
pages/meetingDetail/meetingDetail.js
+131
-749
utils.js
utils/utils.js
+2
-2
No files found.
pages/createMeeting/createMeeting.axml
View file @
12033a9b
...
...
@@ -86,6 +86,6 @@
</view>
<popup title="{{popup.title}}" show="{{popup.show}}" mask="{{popup.mask}}" onClose="closePopup">
<meeting-time-picker a:if="{{'time' === popup.type}}" onComplete="onComplete" isIPX="{{isIPX}}"></meeting-time-picker>
<list a:if="{{popup.type=='repeat'}}" dataComList="{{repeat.repeatList}}" onComSelectList="selectRepeatListItem"></list>
<list a:if="{{popup.type=='repeat'}}" dataComList="{{repeat.repeatList}}"
comSelectListId="{{repeat.selectRepeatId}}"
onComSelectList="selectRepeatListItem"></list>
</popup>
</view>
\ No newline at end of file
pages/createTask/createTask.js
View file @
12033a9b
...
...
@@ -71,7 +71,6 @@ create.Page({
// 修改动态列表
for
(
let
i
=
0
;
i
<
res
.
data
.
data
.
length
;
i
++
)
{
this
.
store
.
data
.
affairList
.
unshift
(
res
.
data
.
data
[
i
].
commentListDataModelList
[
i
])
}
dd
.
navigateBack
();
...
...
pages/meetingDetail/meetingDetail.axml
View file @
12033a9b
...
...
@@ -164,12 +164,16 @@
</view>
</view>
<!--<selectpopup showSelectPopup="{{selectPopup.show}}" selectPopupList="{{selectPopup.list}}" onSelectPopup="selectParticipateStatus" onSelectPopupCancel="handleSelectPopupCancel"></selectpopup> -->
<selectpopup a:if="{{selectPopup.type === 'repeat'}}" showSelectPopup="{{selectPopup.show}}" selectPopupList="{{selectPopup.list}}" onSelectPopup="selectSaveRepeatStatus" onSelectPopupCancel="handleSelectPopupCancel"></selectpopup>
<selectpopup a:if="{{selectPopup.type === 'participateState'}}" showSelectPopup="{{selectPopup.show}}" selectPopupList="{{selectPopup.list}}" onSelectPopup="selectParticipateStatus" onSelectPopupCancel="handleSelectPopupCancel"></selectpopup>
<selectpopup a:if="{{selectPopup.type === 'deleteState'}}" showSelectPopup="{{selectPopup.show}}" selectPopupList="{{selectPopup.list}}" onSelectPopup="selectDeleteStatus" onSelectPopupCancel="handleSelectPopupCancel"></selectpopup>
<selectpopup a:if="{{selectPopup.type === 'modify_location'}}" showSelectPopup="{{selectPopup.show}}" selectPopupList="{{selectPopup.list}}" onSelectPopup="selectSavePlaceStatus" onSelectPopupCancel="handleSelectPopupPlaceCancel"></selectpopup>
<selectpopup a:if="{{selectPopup.type === 'modify_time'}}" showSelectPopup="{{selectPopup.show}}" selectPopupList="{{selectPopup.list}}" onSelectPopup="selectSaveTimeStatus" onSelectPopupCancel="handleSelectPopupTimeCancel"></selectpopup>
<selectpopup a:if="{{selectPopup.type === 'operate_user'}}" showSelectPopup="{{selectPopup.show}}" selectPopupList="{{selectPopup.list}}" onSelectPopup="selectSavePeopleStatus" onSelectPopupCancel="handleSelectPopupPeopleCancel"></selectpopup>
<centerpopup a:if="{{centerPopup.type === 'modify_location'}}" centerPopup="{{centerPopup.show}}" centerPopupList="{{centerPopup.list}}" onSelectSend="selectPlaceNeedNotice"></centerpopup>
<centerpopup a:if="{{centerPopup.type === 'modify_time'}}" centerPopup="{{centerPopup.show}}" centerPopupList="{{centerPopup.list}}" onSelectSend="selectTimeNeedNotice"></centerpopup>
<centerpopup a:if="{{centerPopup.type === 'operate_user'}}" centerPopup="{{centerPopup.show}}" centerPopupList="{{centerPopup.list}}" onSelectSend="selectPeopleNeedNotice"></centerpopup>
<centerpopup a:if="{{centerPopup.type === 'repeat'}}" centerPopup="{{centerPopup.show}}" centerPopupList="{{centerPopup.list}}" onSelectSend="selectRepeatNeedNotice"></centerpopup>
<toast showToast="{{conToastData.showToast}}" title="{{conToastData.title}}" onToastHidden="onToastHidden"></toast>
<!-- 动态列表 -->
<import src="../../template/avater/index.axml"/>
...
...
@@ -209,7 +213,7 @@
<view a:else></view>
<popup title="{{popup.title}}" show="{{popup.show}}" mask="true" onClose="closePopup">
<remark a:if="{{popup.type == 'remarkModal'}}" onGetRemark="getRemark"/>
<list a:if="{{popup.type=='repeat'}}" dataComList="{{repeat.repeatList}}" onComSelectList="selectRepeatListItem"></list>
<list a:if="{{popup.type=='repeat'}}" dataComList="{{repeat.repeatList}}"
comSelectListId="{{repeat.selectRepeatId}}"
onComSelectList="selectRepeatListItem"></list>
<notes a:if="{{popup.type == 'notesModal'}}" isEdit="{{true}}" onGetNotes="getNotes"/>
<meeting-time-picker a:if="{{'time' === popup.type}}" startTime="{{$data.startTime}}" endTime="{{$data.endTime}}" onComplete="onComplete" isIPX="{{isIPX}}"></meeting-time-picker>
<list a:if="{{popup.type=='aheadTime'}}" onClose="closePopup" multiple="{{true}}" onCompelete="handleAheadTimeSave" complete="{{true}}" dataComList="{{aheadTime.aheadTimeList}}" onComSelectList="selectComList" comSelectList="{{aheadTime.aheadTimesListId}}" iconType="{{aheadTime.iconType}}"></list>
...
...
pages/meetingDetail/meetingDetail.js
View file @
12033a9b
...
...
@@ -22,42 +22,13 @@ create.Page({
affairList
:
null
,
//store,页面用到的变量需要在这里声明
show
:
false
,
//pop
oldTask
:
null
,
// pop: {
// title: '',
// type: ''
// },
loading
:
false
,
// 传给组件list 的所有数据 comListData
comListData
:
{
complete
:
false
,
// aheadTimesListId: [15],
comSelectListId
:
0
,
meetingWayModelId
:
null
,
iconType
:
'icon'
},
conToastData
:
{
showToast
:
false
,
title
:
'保存成功'
},
// 传递给组件selectPopup 的数据
conSelectPopupData
:
{
showSelectPopup
:
false
,
selectType
:
'common'
,
selectPopupId
:
''
,
// editSaveList: [{ text: '仅保存此会议', id: 'only' }, { text: '保存此次及以后会议', id: 'future' }],
// delSheudleList: [{ text: '仅删除此会议', id: 'only' }, { text: '删除此次及以后会议', id: 'future' }],
// participateStatusList: [{ text: '仅参加此次会议', id: 'only' }, { text: '参加所有会议', id: 'all' }],
// noParticipateStatusList: [{ text: '不参加此次会议', id: 'only' }, { text: '不参加所有会议', id: 'all' }]
},
// 传递给组件centerPopup 的数据
// centerPopup: {
// showCenterPopup: false,
// centerPopupList: [
// { id: 0, text: '不发送通知' },
// { id: 1, text: '发送通知' }
// ],
// },
title
:
``
,
meetingRemark
:
''
,
...
...
@@ -97,25 +68,11 @@ create.Page({
type
:
'modify_location'
},
needNotice
:
0
,
repeatWeek
:
[
'SU'
,
'MO'
,
'TU'
,
'WE'
,
'TH'
,
'FR'
,
'SA'
],
popupTitle
:
'会议重复'
,
popupShow
:
false
,
comType
:
''
,
comTimeType
:
''
,
meetingWayModel
:
{
model
:
null
},
weekList
:
[
'周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
],
placeholder
:
''
,
week
:
''
,
conflictPeople
:
[],
lock
:
false
,
// aheadTimes: [15],
editType
:
''
,
placeholder
:
''
,
// editType: '',
mrReserveStatus
:
''
,
id
:
''
},
...
...
@@ -140,7 +97,10 @@ create.Page({
})
}
if
(
this
.
$store
.
data
.
updateInfo
.
updateType
===
'operate_user'
)
{
this
.
handleParticipatorSave
()
this
.
setData
({
'centerPopup.show'
:
true
,
'centerPopup.type'
:
"operate_user"
})
}
this
.
$store
.
data
.
updateInfo
=
{
updateType
:
''
,
...
...
@@ -373,7 +333,7 @@ create.Page({
return
}
this
.
$store
.
data
.
originUsers
.
remark
=
this
.
data
.
remark
this
,
update
()
this
.
update
()
})
},
...
...
@@ -585,14 +545,76 @@ create.Page({
'repeat.selectRepeatId'
:
repeat
.
selectRepeatId
,
})
this
.
closePopup
()
this
.
handleRepeatSave
()
this
.
setData
({
'centerPopup.show'
:
true
,
'centerPopup.type'
:
"repeat"
})
},
// 重复 发不发通知
selectRepeatNeedNotice
(
event
)
{
this
.
handleCloseCenterPopup
()
const
needNotice
=
event
.
currentTarget
.
dataset
.
item
.
id
if
(
this
.
$store
.
data
.
originalData
.
repeatable
===
0
)
{
this
.
handleRepeatSave
(
'only'
,
needNotice
)
return
}
this
.
setData
({
needNotice
:
needNotice
,
selectPopup
:
{
show
:
true
,
list
:
editSaveList
,
type
:
'repeat'
}
})
},
// 保存此次还是以后
selectSaveRepeatStatus
(
event
)
{
this
.
handleSelectPopupCancel
()
const
modifyModel
=
event
.
currentTarget
.
dataset
.
item
.
id
this
.
handleRepeatSave
(
modifyModel
,
this
.
data
.
needNotice
)
},
//保存重复
handleRepeatSave
()
{
handleRepeatSave
(
modifyModel
=
"only"
,
needNotice
=
"N"
)
{
let
modifyContent
=
'to_repeat'
if
(
this
.
$store
.
data
.
originalData
.
repeatable
===
0
&&
this
.
data
.
repeat
.
repeatable
===
1
)
{
modifyContent
=
'to_repeat'
}
else
if
(
this
.
$store
.
data
.
originalData
.
repeatable
===
1
&&
this
.
data
.
repeat
.
repeatable
===
0
)
{
modifyContent
=
"no_repeat"
}
else
{
modifyContent
=
"change_rule"
}
let
dataRepeat
=
{
needNotice
:
needNotice
,
startTime
:
this
.
$store
.
data
.
startTime
.
replace
(
/
\/
/g
,
"-"
),
endTime
:
this
.
$store
.
data
.
endTime
.
replace
(
/
\/
/g
,
"-"
),
modifyModel
:
modifyModel
,
modifyContent
:
modifyContent
,
recurrenceModel
:
this
.
data
.
repeat
.
recurrenceModel
,
repeatable
:
this
.
data
.
repeat
.
repeatable
}
this
.
modifySchedule
(
dataRepeat
).
then
(
res
=>
{
if
(
res
.
data
.
code
!==
0
)
{
this
.
reSetRepeat
()
return
}
this
.
$store
.
data
.
originalData
.
repeatable
=
this
.
data
.
repeat
.
repeatable
this
.
$store
.
data
.
originalData
.
recurrenceModel
=
this
.
data
.
repeat
.
recurrenceModel
this
.
update
()
})
},
// 重置重复规则
reSetRepeat
()
{
this
.
setData
({
repeat
:
{
repeatable
:
this
.
$store
.
data
.
originalData
.
repeatable
,
repeatList
:
repeatList
,
recurrenceModel
:
this
.
$store
.
data
.
originalData
.
repeatable
?
this
.
$store
.
data
.
originalData
:
{
model
:
'no_repeat'
},
selectRepeatId
:
this
.
$store
.
data
.
originalData
.
repeatable
===
0
?
0
:
getSelectRepeatId
(
this
.
$store
.
data
.
originalData
.
recurrenceModel
,
repeatList
)
}
})
},
// 添加参会人
handleAddParticipator
:
throttle
(
async
function
()
{
...
...
@@ -628,12 +650,38 @@ create.Page({
this
.
$store
.
data
.
participatorList
=
participatorList
this
.
$store
.
data
.
showParticipatorList
=
Object
.
values
(
participatorList
)
this
.
update
()
this
.
handleParticipatorSave
()
this
.
setData
({
'centerPopup.show'
:
true
,
'centerPopup.type'
:
"operate_user"
})
// this.handleParticipatorSave()
})
}),
// 保存参会人是否发送通知
selectPeopleNeedNotice
(
event
)
{
this
.
handleCloseCenterPopup
()
const
needNotice
=
event
.
currentTarget
.
dataset
.
item
.
id
if
(
this
.
data
.
repeat
.
repeatable
==
0
)
{
this
.
handleParticipatorSave
(
'only'
,
needNotice
)
return
}
this
.
setData
({
needNotice
:
needNotice
,
selectPopup
:
{
show
:
true
,
list
:
editSaveList
,
type
:
'operate_user'
}
})
},
//保存此次还是以后
selectSavePeopleStatus
(
event
)
{
this
.
handleSelectPopupCancel
()
const
modifyModel
=
event
.
currentTarget
.
dataset
.
item
.
id
this
.
handleParticipatorSave
(
modifyModel
,
this
.
data
.
needNotice
)
},
//保存参会人
handleParticipatorSave
()
{
const
modifyModel
=
"only"
handleParticipatorSave
(
modifyModel
=
"only"
,
needNotice
=
"N"
)
{
const
changePeople
=
handleChangePeople
(
this
.
$store
.
data
.
originUsers
,
this
.
$store
.
data
.
showParticipatorList
)
let
dataUser
=
{
addUserList
:
changePeople
.
add
,
...
...
@@ -641,11 +689,29 @@ create.Page({
modifyModel
:
modifyModel
,
modifyContent
:
'operate_user'
}
if
(
this
.
data
.
repeat
.
repeatable
===
0
)
{
this
.
modifySchedule
(
dataUser
).
then
(
res
=>
{
this
.
$store
.
data
.
originUsers
=
Object
.
values
(
this
.
$store
.
data
.
participatorList
)
})
this
.
modifySchedule
(
dataUser
).
then
(
res
=>
{
if
(
res
.
data
.
code
!==
0
)
{
this
.
resetPeople
()
return
}
this
.
$store
.
data
.
originUsers
=
Object
.
values
(
this
.
$store
.
data
.
participatorList
)
})
},
// 取消参会人的保存
handleSelectPopupPeopleCancel
()
{
this
.
handleSelectPopupCancel
()
this
.
resetPeople
()
},
// 重置参会人
resetPeople
()
{
const
originUsers
=
this
.
$store
.
data
.
originUsers
let
people
=
{}
for
(
let
i
=
0
;
i
<
originUsers
.
length
;
i
++
)
{
people
[
originUsers
[
i
].
userId
]
=
originUsers
[
i
]
}
this
.
$store
.
data
.
participatorList
=
people
this
.
$store
.
data
.
showParticipatorList
=
Object
.
values
(
this
.
$store
.
data
.
participatorList
)
this
.
update
()
},
// 参会人详情
goParticipantsDetail
()
{
...
...
@@ -672,21 +738,9 @@ create.Page({
if
(
this
.
$store
.
modifyErpeatMeeting
)
{
this
.
$store
.
modifyErpeatMeeting
()
}
// if (data.modifyContent !== 'title') {
// if (this.$store.modifyErpeatMeeting) {
// this.$store.modifyErpeatMeeting()
// }
// }
if
(
this
.
data
.
repeat
.
repeatable
===
1
&&
!!
res
.
data
.
data
)
{
observer
.
notice
(
res
.
data
.
data
)
}
// if (data.modifyContent == 'modify_time' || data.modifyContent == ' modify_location') {
// this.setData({
// mrReserveStatus: res.data.extra
// })
// this.$store.data.originalData.mrReserveStatus = res.data.extra
// this.update()
// }
resolve
(
res
)
})
...
...
@@ -768,7 +822,7 @@ create.Page({
this
.
closePopup
()
this
.
setData
({
'aheadTime.aheadTimes'
:
event
,
'aheadTime.aheadTimesListId
.
'
:
event
,
'aheadTime.aheadTimesListId'
:
event
,
})
let
modifyModel
=
"only"
if
(
this
.
data
.
repeat
.
repeatable
!==
0
)
{
...
...
@@ -933,114 +987,6 @@ create.Page({
this
.
$store
.
resetEditData
()
this
.
store
.
data
.
affairList
=
[];
},
// // 选择循环机制 选择会议方式 选择时间 会前提醒 出现popup弹窗
// showPopup(event) {
// let iconType = ''
// let complete = false
// let multiple = false
// let popupTitle = ''
// switch (event.currentTarget.dataset.type) {
// // case 'meetingWayModel':
// // iconType = 'image',
// // complete = true,
// // popupTitle = '选择会议方式',
// // multiple = false
// // break
// case 'repeat':
// iconType = 'icon',
// popupTitle = '会议重复',
// complete = true,
// multiple = false
// break
// case 'participator':
// popupTitle = '选择参会人'
// break
// case 'time':
// popupTitle = '选择会议时间'
// break
// case 'aheadTime':
// popupTitle = '选择会前提醒'
// iconType = 'icon',
// complete = true,
// multiple = true
// break
// }
// this.setData({
// popupShow: true,
// popupTitle: popupTitle,
// comType: event.currentTarget.dataset.type,
// 'comListData.complete': complete,
// 'comListData.iconType': iconType,
// 'comListData.multiple': multiple
// })
// },
// // 选择完comList后的回调 重复 会议方式
// selectComList(event) {
// switch (this.data.comType) {
// case 'meetingWayModel':
// this.setData({
// 'comListData.meetingWayModelId': event.currentTarget.dataset.item.id,
// popupShow: false,
// meetingWayModel: this.data.comListData.meetingWayList[event.currentTarget.dataset.item.id].meetingWayModel
// })
// if (this.data.repeatable) {
// this.setData({
// editType: 'meeting_way'
// })
// this.isChange('meeting_way', 'future')
// } else {
// this.isChange('meeting_way', 'only')
// }
// break;
// case 'repeat':
// this.resetRepeatList()
// this.setData({
// popupShow: false,
// 'conSelectPopupData.selectType': 'common',
// 'comListData.comSelectListId': event.currentTarget.dataset.item.id,
// repeatable: event.currentTarget.dataset.item.repeatable,
// recurrenceModel: event.currentTarget.dataset.item.recurrenceModel
// })
// this.conflictPeople()
// if (this.$store.data.originalData.repeatable) {
// this.setData({
// 'conSelectPopupData.showSelectPopup': true,
// editType: 'repeat'
// })
// } else {
// if (this.$store.data.participatorList.length < 2) {
// this.isChange('repeat', 'only')
// } else {
// this.setData({
// editType: 'repeat',
// 'centerPopup.showCenterPopup': true
// })
// }
// }
// break;
// }
// },
// // 选择会前提醒时间
// selectAheadtimes(event) {
// this.setData({
// aheadTimes: event,
// popupShow: false,
// 'comListData.aheadTimesListId': event
// })
// if (this.data.repeatable) {
// this.setData({
// editType: 'aheadTimes'
// })
// this.isChange('aheadTimes', 'all')
// } else {
// this.isChange('aheadTimes', 'only')
// }
// },
// toast 消失之后的回调
...
...
@@ -1212,269 +1158,7 @@ create.Page({
break
}
},
// 判断数据发生改变 发生改变 请求
// isChange(value, modifyModel, needNotice = 0) {
// let modifyContent = ''
// switch (value) {
// case 'title':
// if (this.data.title !== this.$store.data.originalData.title) {
// let dataTitle = {
// title: this.data.title,
// modifyModel: modifyModel,
// modifyContent: 'title'
// }
// this.modifySchedule(dataTitle).then(res => {
// this.$store.data.isIndexAffairListNeedUpdate = true;
// this.$store.data.originalData.title = this.data.title
// if (this.data.repeatable == 0) {
// if (this.$store.modifyOnceMeetingContent) {
// this.$store.modifyOnceMeetingContent({
// id: this.data.scheduleItem.id,
// title: this.data.title
// })
// }
// } else {
// if (this.$store.modifyErpeatMeeting) {
// this.$store.modifyErpeatMeeting()
// }
// }
// this.update()
// }).catch(err => {
// this.setData({
// title: this.$store.data.originalData.title
// })
// })
// }
// break
// case 'remark':
// if (this.data.remark !== this.$store.data.originalData.remark) {
// let dataRemark = {
// remark: this.data.remark,
// modifyModel: modifyModel,
// modifyContent: 'remark'
// }
// this.modifySchedule(dataRemark).then(res => {
// this.$store.data.originalData.remark = this.data.remark
// this.update()
// }).catch(err => {
// this.setData({
// remark: this.$store.data.originalData.remark
// })
// })
// }
// break
// case 'operate_user':
// if (JSON.stringify(this.$store.data.originUsers) != JSON.stringify(this.$store.data.participatorList)) {
// let addUserList = this.arrayPoor(this.$store.data.originUsers, this.$store.data.participatorList).addUserList
// let deleteUserList = this.arrayPoor(this.$store.data.originUsers, this.$store.data.participatorList).deleteUserList
// let dataUser = {
// addUserList: addUserList,
// deleteUserList: deleteUserList,
// modifyModel: modifyModel,
// modifyContent: 'operate_user'
// }
// this.modifySchedule(dataUser, needNotice).then(res => {
// this.$store.data.originUsers = [...this.$store.data.participatorList]
// this.$store.data.originUsersId = [...this.$store.data.participatorUserId]
// this.$store.data.updateInfo = {
// updateType: '',
// isUpate: false
// }
// this.update()
// }).catch(err => {
// this.$store.data.participatorList = [...this.$store.data.originUsers]
// this.$store.data.participatorUserId = [...this.$store.data.originUsersId]
// this.$store.data.updateInfo = {
// updateType: '',
// isUpate: false
// }
// this.update()
// })
// }
// break
// case 'repeat':
// let repeatListMap = new Map()
// for (let item of this.data.comListData.repeatList) {
// if (item.recurrenceModel.recurrenceModel !== 'weekly') {
// repeatListMap.set(item.recurrenceModel.model, item.id)
// }
// }
// if (this.$store.data.originalData.repeatable === 0 && this.data.repeatable === 1) {
// let dataRepeat1 = {
// startTime: this.$store.data.startTime.replace(/\//g, "-"),
// endTime: this.$store.data.endTime.replace(/\//g, "-"),
// modifyModel: modifyModel,
// modifyContent: 'to_repeat',
// recurrenceModel: this.data.recurrenceModel,
// repeatable: this.data.repeatable
// }
// this.modifySchedule(dataRepeat1).then(res => {
// observer.notice(res.data.data)
// this.$store.data.originalData.recurrenceModel = this.data.recurrenceModel
// this.$store.data.originalData.repeatable = this.data.repeatable
// this.update()
// }).catch(err => {
// this.setData({
// 'comListData.comSelectListId': this.$store.data.originalData.recurrenceModel.model === 'weekly' ? (this.$store.data.originalData.recurrenceModel.weekDayList.length > 1 ? 3 : 2) : repeatListMap.get(this.$store.data.originalData.recurrenceModel.model),
// repeatable: this.$store.data.originalData.repeatable,
// recurrenceModel: this.$store.data.originalData.repeatable ? { model: this.storer.data.originalData.recurrenceModel.model, daysOfMonth: this.$store.data.originalData.recurrenceModel.daysOfMonth, interval: 1, initialTime: this.$store.data.originalData.recurrenceModel.initialTime, terminateTime: this.$store.data.originalData.recurrenceModel.terminateTime, weekDayList: this.$store.data.originalData.recurrenceModel.weekDayList } : { model: 'no_repeat' }
// })
// })
// }
// else if (this.$store.data.originalData.repeatable === 1 && this.data.repeatable === 0) {
// let dataRepeat2 = {
// startTime: this.$store.data.startTime.replace(/\//g, "-"),
// endTime: this.$store.data.endTime.replace(/\//g, "-"),
// modifyModel: modifyModel,
// modifyContent: 'no_repeat',
// recurrenceModel: this.data.recurrenceModel,
// repeatable: this.data.repeatable
// }
// this.modifySchedule(dataRepeat2).then(res => {
// this.$store.data.originalData.recurrenceModel = this.data.recurrenceModel
// this.$store.data.originalData.repeatable = this.data.repeatable
// this.update()
// }).catch(err => {
// this.setData({
// 'comListData.comSelectListId': this.$store.data.originalData.recurrenceModel.model === 'weekly' ? (this.$store.data.originalData.recurrenceModel.weekDayList.length > 1 ? 3 : 2) : repeatListMap.get(this.$store.data.originalData.recurrenceModel.model),
// repeatable: this.$store.data.originalData.repeatable,
// recurrenceModel: this.$store.data.originalData.repeatable ? { model: this.$store.data.originalData.recurrenceModel.model, daysOfMonth: this.$store.data.originalData.recurrenceModel.daysOfMonth, interval: 1, initialTime: this.$store.data.originalData.recurrenceModel.initialTime, terminateTime: this.$store.data.originalData.recurrenceModel.terminateTime, weekDayList: this.$store.data.originalData.recurrenceModel.weekDayList } : { model: 'no_repeat' }
// })
// })
// }
// else {
// let dataRepeat3 = {
// startTime: this.$store.data.startTime.replace(/\//g, "-"),
// endTime: this.$store.data.endTime.replace(/\//g, "-"),
// modifyModel: modifyModel,
// modifyContent: 'change_rule',
// recurrenceModel: this.data.recurrenceModel,
// repeatable: this.data.repeatable
// }
// this.modifySchedule(dataRepeat3).then(res => {
// this.$store.data.originalData.recurrenceModel = this.data.recurrenceModel
// this.$store.data.originalData.repeatable = this.data.repeatable
// this.update()
// }).catch(err => {
// this.setData({
// 'comListData.comSelectListId': this.$store.data.originalData.recurrenceModel.model === 'weekly' ? (this.$store.data.originalData.recurrenceModel.weekDayList.length > 1 ? 3 : 2) : repeatListMap.get(this.$store.data.originalData.recurrenceModel.model),
// repeatable: this.$store.data.originalData.repeatable
// })
// })
// }
// break
// case 'modify_location':
// let dataLocation = {
// modifyModel: modifyModel,
// modifyContent: 'modify_location',
// location: {
// longitude: '-999',
// latitude: '-999',
// locationName: this.$store.data.locationName
// },
// meetingRoomId: !!this.$store.data.roomId ? this.$store.data.roomId : -1
// }
// this.modifySchedule(dataLocation, needNotice).then(res => {
// this.$store.data.originalData.location = {
// longitude: '-999',
// latitude: '-999',
// locationName: this.$store.data.locationName
// }
// this.$store.data.originalData.meetingRoomId = this.$store.data.roomId ? -1 : this.$store.data.roomId
// this.$store.data.updateInfo = {
// isUpate: false,
// updateType: ''
// }
// this.update()
// if (this.$store.data.startTime != this.$store.data.originalData.startTime.replace(/-/g, '/') || this.$store.data.endTime != this.$store.data.originalData.endTime.replace(/-/g, '/')) {
// let dat2Time1 = {
// modifyModel: modifyModel,
// startTime: this.$store.data.startTime.replace(/\//g, "-"),
// endTime: this.$store.data.endTime.replace(/\//g, "-"),
// modifyContent: 'modify_time'
// }
// this.isChange('modify_time', modifyModel, needNotice)
// }
// }).catch(err => {
// this.$store.data.locationName = this.$store.data.originalData.location.locationName
// this.$store.data.roomId = this.$store.data.originalData.meetingRoomId
// this.update()
// })
// break
// case 'modify_time':
// let data = {
// modifyModel: modifyModel,
// startTime: this.$store.data.startTime.replace(/\//g, "-"),
// endTime: this.$store.data.endTime.replace(/\//g, "-"),
// modifyContent: 'modify_time'
// }
// this.modifySchedule(data, needNotice).then(res => {
// this.$store.data.originalData.startTime = this.$store.data.startTime.replace(/\//g, "-")
// this.$store.data.originalData.endTime = this.$store.data.endTime.replace(/\//g, "-")
// this.update()
// this.resetRepeatList()
// if (this.data.recurrenceModel.model === 'weekly' && this.data.recurrenceModel.weekDayList.length === 1) {
// let dataRepeat4 = {
// startTime: this.$store.data.startTime.replace(/\//g, "-"),
// endTime: this.$store.data.endTime.replace(/\//g, "-"),
// modifyModel: modifyModel,
// modifyContent: 'change_rule',
// recurrenceModel: this.data.comListData.repeatList[2].recurrenceModel,
// repeatable: this.data.repeatable
// }
// this.modifySchedule(dataRepeat4).then(() => {
// this.setData({
// recurrenceModel: this.data.comListData.repeatList[2].recurrenceModel
// })
// })
// } else if (this.data.recurrenceModel.model === 'absolute_Monthly') {
// let dataRepeat5 = {
// startTime: this.$store.data.startTime.replace(/\//g, "-"),
// endTime: this.$store.data.endTime.replace(/\//g, "-"),
// modifyModel: modifyModel,
// modifyContent: 'change_rule',
// recurrenceModel: this.data.comListData.repeatList[4].recurrenceModel,
// repeatable: this.data.repeatable
// }
// this.modifySchedule(dataRepeat5).then(() => {
// this.setData({
// recurrenceModel: this.data.comListData.repeatList[4].recurrenceModel
// })
// })
// }
// // this.modifySchedule(data, needNotice)
// }).catch(err => {
// this.$store.data.startTime = this.$store.data.originalData.startTime.replace(/-/g, '/')
// this.$store.data.endTime = this.$store.data.originalData.endTime.replace(/-/g, '/')
// this.update()
// this.setData({
// week: this.data.weekList[new Date(this.$store.data.originalData.startTime.replace(/-/g, "/")).getDay()],
// })
// })
// break
// // case 'aheadTimes':
// // let dataAheadTimes = {
// // modifyModel: modifyModel,
// // aheadTimes: this.data.aheadTimes,
// // modifyContent: 'aheadTimes'
// // }
// // this.modifySchedule(dataAheadTimes).then(res => {
// // this.$store.data.originalData.aheadTimes = (this.data.aheadTimes.length === 0 ? null : this.data.aheadTimes)
// // this.update()
// // }).catch(err => {
// // this.setData({
// // aheadTimes: this.$store.data.originalData.aheadTimes
// // })
// // })
// // break
// }
// },
// 页面卸载
...
...
@@ -1485,22 +1169,6 @@ create.Page({
//获取动态列表
loadAffairList
(
current
=
1
)
{
// if (this.data.repeatable == 1) {
// if (!this.data.scheduleItem.groupId) {
// console.log(`groupId不存在`)
// return
// }
// this.getRepeatAffairList(this.data.scheduleItem.groupId, current)
// } else {
// if (!this.data.scheduleItem.id) {
// console.log(`scheduleItem.id不存在`)
// return
// }
// this.getAffairList(this.data.scheduleItem.id)
// }
// //重置
// this.store.data.isNeedReloadList = false;
// this.update();
this
.
getAffairList
(
this
.
store
.
data
.
scheduleId
)
...
...
@@ -1518,89 +1186,6 @@ create.Page({
});
})
},
//获取重复会议动态列表
// getRepeatAffairList(groupId, current) {
// getMeetingRoomRepeatAffairs(groupId, current).then(res => {
// const newAffairList = this.dealRepeatAffairs(res.data.data.records || []);
// //第一页数据会重新请求需要替换
// if (current === 1) {
// this.store.data.affairList = newAffairList;
// this.update();
// } else {
// const newDynamicList = this.store.data.affairList.concat(newAffairList);
// this.store.data.affairList = newDynamicList;
// this.update();
// }
// this.setData({
// affairLoading: false,
// current: res.data.data.current,
// pages: res.data.data.pages
// });
// })
// },
//加载之前的会议动态
// loadAffairMore() {
// if (this.data.current < this.data.pages) {
// this.loadAffairList(this.data.current + 1);
// }
// },
//处理重复会议动态数据
// dealRepeatAffairs(affairList, type) {
// // const newAffairData = {};
// // const newAffairList = [];
// // affairList.forEach(it => {
// // if (it.meetingLogResource) {
// // newAffairData[it.resourceId] = []
// // }
// // })
// return affairList.map(item => {
// let itemData = item.meetingLogResource;
// if (itemData) {
// if (item.createTime) {
// item.sort1 = item.createTime
// item.sort = new Date(item.createTime.replace(/-/g, '/')).getTime();
// item.createTime = getCreateShowTime(item.createTime);
// }
// if (itemData.acceptorInfo) {
// itemData.acceptorInfo = JSON.parse(itemData.acceptorInfo);
// }
// if (itemData.creatorInfo) {
// itemData.creatorInfo = JSON.parse(itemData.creatorInfo);
// }
// if (itemData.fileInfos) {
// item.fileView = {
// fileInfos: JSON.parse(itemData.fileInfos),
// creatorInfo: itemData.creatorInfo,
// id: itemData.id,
// description: itemData.description
// };
// }
// if (itemData.taskInfos) {
// item.taskViewList = [
// {
// acceptorInfo: itemData.acceptorInfo,
// acceptorId: itemData.acceptorId,
// creatorInfo: itemData.creatorInfo,
// creatorId: itemData.creatorId,
// taskInfos: JSON.parse(itemData.taskInfos),
// taskStatus: itemData.taskStatus,
// id: itemData.id
// }
// ]
// }
// // newAffairData[item.resourceId].push(item);
// }
// return item
// });
// // console.log(newAffairData);
// // for (let i in newAffairData) {
// // newAffairData[i].sort((a, b) => a.sort - b.sort);
// // newAffairList.push(newAffairData[i][0])
// // }
// // console.log(newAffairList)
// // return newAffairList.sort((a, b) => a.sort - b.sort);
// },
// 获取所有的任务和文件
getTaskAndFiles
(
affairList
)
{
...
...
@@ -1638,65 +1223,6 @@ create.Page({
show
:
true
})
},
// closePop() {
// this.setData({
// show: false
// });
// if (this.data.pop.type == 'updateTask') {
// const { currentTask } = this.store.data;
// const { oldTask } = this.data;
// //添加执行人
// if (!oldTask.acceptorId && currentTask.acceptorId) {
// this.addTaskExcutor();
// }
// ///删除执行人
// else if (oldTask.acceptorId && !currentTask.acceptorId) {
// this.deleteTaskExcutor();
// }
// //修改执行人
// else if ((oldTask.acceptorId && currentTask.acceptorId) && (oldTask.acceptorId !== currentTask.acceptorId)) {
// this.updateTaskExcutor();
// }
// //修改任务标题
// if (currentTask.taskInfos.taskTitle && currentTask.taskInfos.taskTitle !== oldTask.taskInfos.taskTitle) {
// this.editTaskTitle();
// }
// //修改任务状态
// if (currentTask.taskStatus !== oldTask.taskStatus) {
// this.changeTaskStatus();
// }
// //刷新列表,这里为什么不在promie后执行
// setTimeout(() => {
// if (this.store.data.isNeedReloadList) {
// this.loadAffairList();
// this.setData({
// 'conToastData.showToast': true,
// 'conToastData.title': '编辑成功',
// })
// this.$store.data.isIndexAffairListNeedUpdate = true;
// this.update();
// }
// }, 500)
// }
// },
//出现任务弹窗
// showCreateTask(e) {
// //重置
// this.store.data.currentTask = {};
// this.update();
// this.showPop(e)
// },
//设置修改任务弹框中当前任务
// setCurrentTask(currentTask) {
// this.setData({
// oldTask: JSON.parse(JSON.stringify(currentTask))
// })
// this.store.data.currentTask = currentTask;
// this.update();
// },
// 上传文件
async
handleAddFile
()
{
...
...
@@ -1727,150 +1253,7 @@ create.Page({
dd
.
navigateTo
({
url
:
`./../uploadFile/uploadFile?id=
${
this
.
store
.
data
.
scheduleId
}
`
})
},
//隐藏文件操作浮窗
// hideFileOperate() {
// this.store.data.logId = '';
// this.update();
// },
// 删除文件
// deleteMeetingFile(id) {
// this.updateTask({
// "logType": "schedule_accessory_remove",
// "resourceType": "accessory",
// "id": id
// }, () => {
// this.loadAffairList();
// this.$store.data.isIndexAffairListNeedUpdate = true;
// this.update();
// })
// },
// 删除执行人
// deleteTaskExcutor() {
// this.updateTask({
// "logType": "task_remove_acceptor",
// acceptorInfo: JSON.stringify(this.data.oldTask.acceptorInfo),
// acceptorId: this.data.oldTask.acceptorId
// })
// },
// 添加执行人
// addTaskExcutor() {
// this.updateTask({
// "logType": "task_add_acceptor",
// acceptorInfo: JSON.stringify(this.store.data.currentTask.acceptorInfo),
// acceptorId: this.store.data.currentTask.acceptorId
// })
// },
//修改执行人
// updateTaskExcutor() {
// this.updateTask({
// "logType": "task_modify_acceptor",
// acceptorInfo: JSON.stringify(this.store.data.currentTask.acceptorInfo),
// acceptorId: this.store.data.currentTask.acceptorId
// })
// },
//修改任务标题
// editTaskTitle(value) {
// this.updateTask({
// "logType": "task_modify_title",
// "taskInfos": JSON.stringify(this.store.data.currentTask.taskInfos)
// })
// },
//重复任务状态处理
// dealRepeatStatus(task) {
// let dataIndex = "";
// this.data.affairList.forEach((item, index) => {
// if (item.meetingLogResource.id == task.id) {
// dataIndex = index;
// }
// });
// const setData = `affairList[${dataIndex}].taskViewList[0].taskStatus`;
// const setData2 = `affairList[${dataIndex}].meetingLogResource.taskStatus`;
// this.store.data[setData] = task.status;
// this.store.data[setData2] = task.status;
// this.update();
// },
//弹窗修改任务状态
// changeTaskStatus() {
// this.updateTask({
// "logType": "task_status_modify",
// "taskStatus": this.store.data.currentTask.taskStatus
// }, () => {
// if (this.data.repeatable == 1) {
// this.dealRepeatStatus({ status: this.store.data.currentTask.taskStatus, id: this.store.data.currentTask.id });
// }
// this.store.data.isNeedReloadList = true;
// this.update();
// })
// },
//删除任务
// deleteTask(id) {
// this.updateTask({
// "logType": "task_remove",
// }, () => {
// this.closePop();
// this.loadAffairList();
// this.$store.data.isIndexAffairListNeedUpdate = true;
// this.update();
// })
// },
//修改任务
// updateTask(taskData, callBack) {
// const postData = {
// "groupId": this.data.scheduleItem.groupId,
// "scheduleId": this.data.scheduleItem.id,
// "resourceType": "task",
// "creatorId": getApp().globalData.userid,
// "creatorInfo": getApp().globalData.userInfo,
// "id": this.store.data.currentTask.id,
// ...taskData
// }
// updateMeetingTask(postData).then(res => {
// if (res.data.code == 0) {
// if (callBack) {
// callBack();
// } else {
// this.store.data.isNeedReloadList = true;
// this.update();
// }
// }
// })
// },
//创建任务
// complete: throttle(function () {
// const { currentTask } = this.store.data;
// const postData = {
// "groupId": this.data.scheduleItem.groupId,
// "scheduleId": this.data.scheduleItem.id,
// "resourceType": "task",
// "creatorId": getApp().globalData.userid,
// "creatorInfo": getApp().globalData.userInfo,
// "logType": "task_add",
// "taskInfos": JSON.stringify(currentTask.taskInfos),
// "taskStatus": '0',
// "description": ""
// }
// if (currentTask.acceptorId) {
// postData.acceptorId = currentTask.acceptorId;
// postData.acceptorInfo = JSON.stringify(currentTask.acceptorInfo);
// }
// createMeetingTask(postData).then(res => {
// if (res.data.code == 0) {
// this.loadAffairList();
// this.closePop();
// this.setData({
// 'conToastData.showToast': true,
// 'conToastData.title': '保存成功',
// })
// //重置
// this.store.data.currentTask = {};
// this.update();
// this.$store.data.isIndexAffairListNeedUpdate = true;
// this.update();
// }
// })
// }),
expand
()
{
this
.
setData
({
isExpand
:
false
...
...
@@ -1967,8 +1350,7 @@ create.Page({
meetingId
:
this
.
store
.
data
.
scheduleId
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
this
.
closePopup1
();
// clear
this
.
closePopup
();
this
.
store
.
data
.
notes
=
null
;
this
.
update
();
}
...
...
@@ -1986,7 +1368,7 @@ create.Page({
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
this
.
getAffairList
(
this
.
store
.
data
.
scheduleId
);
this
.
closePopup
1
();
this
.
closePopup
();
}
})
},
...
...
utils/utils.js
View file @
12033a9b
...
...
@@ -247,7 +247,7 @@ export function dealRepeatModal(item) {
}
}
// 每周的一天重复
recurrenceModel
.
weekDayList
=
repeatWeek
[
new
Date
(
globalStore
.
data
.
startTime
).
getDay
()
]
recurrenceModel
.
weekDayList
=
[
repeatWeek
[
new
Date
(
globalStore
.
data
.
startTime
).
getDay
()]
]
return
{
repeatable
:
item
.
repeatable
,
recurrenceModel
:
recurrenceModel
,
...
...
@@ -264,7 +264,7 @@ export function modifyTimeImpactRepeat(recurrenceModel) {
recurrenceModel
.
initialTime
=
initialTime
recurrenceModel
.
terminateTime
=
terminateTime
if
(
recurrenceModel
.
model
===
'weekly'
&&
recurrenceModel
.
weekDayList
.
length
===
1
)
{
recurrenceModel
.
weekDayList
=
repeatWeek
[
new
Date
(
globalStore
.
data
.
startTime
).
getDay
()
]
recurrenceModel
.
weekDayList
=
[
repeatWeek
[
new
Date
(
globalStore
.
data
.
startTime
).
getDay
()]
]
}
if
(
recurrenceModel
.
model
===
'absolute_Monthly'
)
{
recurrenceModel
.
daysOfMonth
=
[
new
Date
(
globalStore
.
data
.
startTime
).
getDate
()]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment