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
dce367d5
Commit
dce367d5
authored
Apr 01, 2020
by
xiexiaoqin
Browse files
Options
Browse Files
Download
Plain Diff
fix conflit
parents
8148ecff
9e7aa95a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
345 additions
and
74 deletions
+345
-74
app.json
app.json
+20
-19
createMeeting.axml
pages/createMeeting/createMeeting.axml
+1
-1
createMeeting.js
pages/createMeeting/createMeeting.js
+2
-1
index.js
pages/index/index.js
+0
-2
meetingDetail.acss
pages/meetingDetail/meetingDetail.acss
+15
-0
meetingDetail.axml
pages/meetingDetail/meetingDetail.axml
+0
-0
meetingDetail.js
pages/meetingDetail/meetingDetail.js
+22
-8
meetingRoomList.js
pages/meetingRoomList/meetingRoomList.js
+3
-1
outLookContact.axml
pages/outLookContact/outLookContact.axml
+5
-1
outLookContact.js
pages/outLookContact/outLookContact.js
+180
-17
outLookContact.json
pages/outLookContact/outLookContact.json
+11
-1
participantsDetail.acss
pages/participantsDetail/participantsDetail.acss
+5
-0
participantsDetail.axml
pages/participantsDetail/participantsDetail.axml
+12
-10
participantsDetail.js
pages/participantsDetail/participantsDetail.js
+63
-7
place.axml
pages/place/place.axml
+5
-5
place.js
pages/place/place.js
+1
-1
No files found.
app.json
View file @
dce367d5
{
"pages"
:
[
"pages/index/index"
,
"pages/meetingDetail/meetingDetail"
,
"pages/excutorList/excutorList"
,
"pages/createMeeting/createMeeting"
,
"pages/outLookContact/outLookContact"
,
"pages/place/place"
,
"pages/meetingRoomList/meetingRoomList"
,
"pages/addRemark/addRemark"
,
"pages/uploadFile/uploadFile"
,
"pages/repetitionTime/repetitionTime"
,
"pages/repeatMechanism/repeatMechanism"
,
"pages/attendingSituation/attendingSituation"
,
"pages/remind/remind"
,
"pages/scheduleDetail/scheduleDetail"
,
"pages/participantsDetail/participantsDetail"
,
"pages/applicationDetails/applicationDetails"
,
"pages/attendeeList/attendeeList"
]
"pages"
:
[
"pages/index/index"
,
"pages/meetingDetail/meetingDetail"
,
"pages/excutorList/excutorList"
,
"pages/createMeeting/createMeeting"
,
"pages/outLookContact/outLookContact"
,
"pages/place/place"
,
"pages/meetingRoomList/meetingRoomList"
,
"pages/addRemark/addRemark"
,
"pages/uploadFile/uploadFile"
,
"pages/repetitionTime/repetitionTime"
,
"pages/repeatMechanism/repeatMechanism"
,
"pages/attendingSituation/attendingSituation"
,
"pages/remind/remind"
,
"pages/scheduleDetail/scheduleDetail"
,
"pages/participantsDetail/participantsDetail"
,
"pages/applicationDetails/applicationDetails"
,
"pages/attendeeList/attendeeList"
]
}
\ No newline at end of file
pages/createMeeting/createMeeting.axml
View file @
dce367d5
...
...
@@ -52,7 +52,7 @@
</view>
<!-- participatorList participatorUserId 参会人 -->
<view class="participator">
<view class="iconicon_attender iconfont icon {{participatorList.length>1 ? '' : 'noValueIcon'}}"
"
>
<view class="iconicon_attender iconfont icon {{participatorList.length>1 ? '' : 'noValueIcon'}}">
</view>
<view class="participatorContaint">
<view class="participatorText" a:if="{{participatorList.length < 2}}" catchTap="showPopup" data-type='participator'>
...
...
pages/createMeeting/createMeeting.js
View file @
dce367d5
...
...
@@ -77,7 +77,6 @@ create.Page({
setTimeout
(()
=>
{
this
.
update
()
},
100
)
},
// 添加描述
addRemark
()
{
...
...
@@ -108,6 +107,8 @@ create.Page({
this
.
store
.
data
.
roomId
=
''
this
.
store
.
data
.
participatorList
=
[]
this
.
store
.
data
.
participatorUserId
=
[]
this
.
store
.
data
.
originUsers
=
[]
this
.
store
.
data
.
originUsersId
=
[]
this
.
store
.
data
.
locationName
=
''
this
.
store
.
data
.
startTime
=
this
.
getTimes
()
this
.
store
.
data
.
endTime
=
this
.
getTimes
(
new
Date
(
this
.
getTimes
()).
setMinutes
(
new
Date
(
this
.
store
.
data
.
startTime
).
getMinutes
()
+
30
))
...
...
pages/index/index.js
View file @
dce367d5
import
{
getFormatDate
}
from
'../../utils/utils'
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
...
...
@@ -12,7 +11,6 @@ create.Page({
},
onShow
()
{
this
.
update
()
},
// 修改tabBar
...
...
pages/meetingDetail/meetingDetail.acss
View file @
dce367d5
...
...
@@ -110,6 +110,7 @@ page {
padding: 28rpx 32rpx 24rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.08);
background: #fff;
}
.hideTitle {
...
...
@@ -497,4 +498,17 @@ input {
.affair-list-title {
font-size: 40rpx;
color: rgba(25, 31, 37, 1);
}
.permissionContant {
height: auto;
position: relative;
}
.permission {
width: 100%;
height: 100%;
position: absolute;
top: 0;
z-index: 999;
}
\ No newline at end of file
pages/meetingDetail/meetingDetail.axml
View file @
dce367d5
This diff is collapsed.
Click to expand it.
pages/meetingDetail/meetingDetail.js
View file @
dce367d5
import
create
from
'dd-store'
;
// import exampleStore from '/stores/exampleStore'
import
pageStore
from
'./store'
;
import
{
getMeetingRoomAffairs
,
createMeetingTask
,
deleteMeetingTask
,
updateMeetingTask
,
uploadPermissions
}
from
'../../api/request'
;
import
{
isParticipate
,
deleteSchedule
,
getScheduleDetail
,
getUserScheduleInTime
,
modifySchedule
}
from
'../../api/request.js'
import
{
throttle
}
from
'./../../utils/utils.js'
import
{
observer
}
from
'/utils/observer.js'
import
{
resolve
}
from
'path'
;
create
.
Page
({
store
:
pageStore
,
useAll
:
true
,
...
...
@@ -19,7 +18,6 @@ create.Page({
title
:
''
,
type
:
''
},
// 传给组件list 的所有数据 comListData
comListData
:
{
repeatList
:
[
...
...
@@ -103,8 +101,11 @@ create.Page({
lock
:
false
,
aheadTimes
:
[
15
],
organizer
:
''
,
currentPeople
:
''
,
editType
:
''
,
confirmAttendance
:
null
confirmAttendance
:
null
,
onload
:
false
,
c
:
false
},
onShow
()
{
console
.
log
(
this
)
...
...
@@ -123,6 +124,8 @@ create.Page({
})
this
.
setData
({
scheduleItem
:
JSON
.
parse
(
event
.
scheduleItem
),
onload
:
true
,
currentPeople
:
getApp
().
globalData
.
userid
})
this
.
getDetail
()
let
scheduleItem
=
this
.
data
.
scheduleItem
...
...
@@ -177,7 +180,8 @@ create.Page({
title
:
res
.
data
.
data
.
title
,
remark
:
res
.
data
.
data
.
remark
,
isShowRemark
:
res
.
data
.
data
.
remark
?
true
:
false
,
week
:
this
.
data
.
weekList
[
new
Date
(
res
.
data
.
data
.
startTime
.
replace
(
/'-'/g
,
"
\
/"
)).
getDay
()]
week
:
this
.
data
.
weekList
[
new
Date
(
res
.
data
.
data
.
startTime
.
replace
(
/'-'/g
,
"
\
/"
)).
getDay
()],
getData
:
true
})
if
(
res
.
data
.
data
.
repeatable
)
{
this
.
setData
({
...
...
@@ -428,7 +432,7 @@ create.Page({
this
.
setData
({
popupShow
:
false
})
dd
.
navigateTo
({
url
:
`./../outLookContact/outLookContact?scheduleItem=
${
this
.
data
.
scheduleItem
}
`
})
dd
.
navigateTo
({
url
:
`./../outLookContact/outLookContact?scheduleItem=
${
JSON
.
stringify
(
this
.
data
.
scheduleItem
)
}
`
})
break
;
}
},
...
...
@@ -637,6 +641,7 @@ create.Page({
},
// onSelectPopup 选择完的回调
onSelectPopup
(
event
)
{
const
_that
=
this
switch
(
this
.
data
.
conSelectPopupData
.
selectType
)
{
case
'common'
:
if
(
this
.
data
.
editType
===
'operate_user'
||
this
.
data
.
editType
===
'modify_location'
||
this
.
data
.
editType
===
'modify_time'
)
{
...
...
@@ -656,6 +661,7 @@ create.Page({
}
isParticipate
(
data1
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
observer
.
notice
(
res
.
data
.
data
)
this
.
setData
({
confirmAttendance
:
0
,
'conToastData.showToast'
:
true
,
...
...
@@ -673,6 +679,7 @@ create.Page({
}
isParticipate
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
observer
.
notice
(
res
.
data
.
data
)
this
.
setData
({
confirmAttendance
:
1
,
'conToastData.showToast'
:
true
,
...
...
@@ -697,6 +704,8 @@ create.Page({
planDate
:
this
.
data
.
scheduleItem
.
planDate
}
deleteSchedule
(
data
).
then
(
res
=>
{
_that
.
$store
.
data
.
indexNeedUpdate
=
true
_that
.
update
()
dd
.
navigateBack
({
delta
:
1
})
...
...
@@ -1385,6 +1394,12 @@ create.Page({
this
.
update
();
}
})
},
//
expand
()
{
this
.
setData
({
onload
:
false
})
}
});
...
...
@@ -1433,4 +1448,4 @@ function getCreateShowTime(createdTime) {
}
return
timeResule
}
\ No newline at end of file
}
pages/meetingRoomList/meetingRoomList.js
View file @
dce367d5
...
...
@@ -68,6 +68,7 @@ create.Page({
this
.
getPageData
()
},
onShow
()
{
this
.
update
()
},
getPageData
()
{
let
that
=
this
...
...
@@ -180,7 +181,7 @@ create.Page({
modalList
:
modalList
,
isShowModal
:
true
,
canScroll
:
false
,
toThisTime
:
`
${
modalHour
}
:
${
modalMins
<
30
?
'30'
:
'00'
}
`
toThisTime
:
`
${
modalHour
}
:
${
modalMins
<
30
?
'30'
:
'00'
}
`
})
})
},
...
...
@@ -752,6 +753,7 @@ create.Page({
},
onUnload
()
{
// 页面被关闭
},
onPullDownRefresh
()
{
// 页面被下拉
...
...
pages/outLookContact/outLookContact.axml
View file @
dce367d5
...
...
@@ -16,7 +16,7 @@
<view class="contactText">
{{item.username}}
</view>
<view class="contactClose icon iconfont iconicon_close" onTap="close" data-item="{{item}}">
<view
a:if="{{!!scheduleItem ? !(item.userId == originalData || originUsersId.includes(item.userId)) : !(item.userId == originalData)}}"
class="contactClose icon iconfont iconicon_close" onTap="close" data-item="{{item}}">
</view>
</view>
</view>
...
...
@@ -26,4 +26,7 @@
确认添加
</view>
</view>
<toast showToast="{{conToastData.showToast}}" title="{{conToastData.title}}" onToastHidden="onToastHidden"></toast>
<centerpopup centerPopup="{{centerPopup.showCenterPopup}}" centerPopupList="{{centerPopup.centerPopupList}}" onSelectSend="onSelectSend"></centerpopup>
<selectpopup showSelectPopup="{{conSelectPopupData.showSelectPopup}}" selectPopupList="{{conSelectPopupData.editSaveList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
</view>
\ No newline at end of file
pages/outLookContact/outLookContact.js
View file @
dce367d5
import
{
getUserScheduleInTime
}
from
'../../api/request.js'
import
{
getUserScheduleInTime
,
modifySchedule
}
from
'../../api/request.js'
import
{
throttle
}
from
'./../../utils/utils.js'
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
{
observer
}
from
'/utils/observer.js'
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
data
:
{
userList
:
[],
userListId
:
[],
outlookContact
:
[],
value
:
''
,
conflictPeople
:
[],
scheduleItem
:
''
scheduleItem
:
''
,
// 传给组件 hList 水平排列 所有数据 comHListData
comHListData
:
{
contactData
:
[
{
id
:
0
,
text
:
'钉钉联系人'
,
imageUrl
:
'../../assests/dingContact.png'
},
{
id
:
1
,
text
:
'手动添加邮箱'
,
imageUrl
:
'../../assests/emailContact.png'
}
]
},
popupShow
:
false
,
// 传递给组件selectPopup 的数据
conSelectPopupData
:
{
selectPopupId
:
''
,
showSelectPopup
:
false
,
selectType
:
'common'
,
editSaveList
:
[{
text
:
'仅保存此会议'
,
id
:
'only'
},
{
text
:
'保存此次及以后会议'
,
id
:
'future'
}]
},
// 传递给组件centerPopup 的数据
centerPopup
:
{
showCenterPopup
:
false
,
centerPopupList
:
[
{
id
:
0
,
text
:
'不发送通知'
},
{
id
:
1
,
text
:
'发送通知'
},
{
id
:
-
1
,
text
:
'取消编辑'
}
],
centerPopupId
:
''
},
// 传递给组件toast的所有数据
conToastData
:
{
showToast
:
false
,
title
:
'保存成功'
},
},
onLoad
(
event
)
{
const
_that
=
this
if
(
event
.
scheduleItem
)
{
let
scheduleItem
=
event
.
scheduleItem
let
scheduleItem
=
JSON
.
parse
(
event
.
scheduleItem
)
this
.
setData
({
scheduleItem
:
scheduleItem
})
...
...
@@ -27,6 +61,14 @@ create.Page({
this
.
setData
({
outlookContact
:
outlookContact
})
observer
.
register
({
notice
(
scheduleItem
)
{
_that
.
setData
({
'scheduleItem.scheduleTemplateId'
:
scheduleItem
})
console
.
log
(
scheduleItem
);
}
})
this
.
conflictPeople
()
},
onShow
()
{
...
...
@@ -88,31 +130,111 @@ create.Page({
save
()
{
// concat 拼接后生成新的数组 push 返回的是长度
let
participatorList
=
[]
let
participatorListId
=
[]
for
(
let
value
of
this
.
store
.
data
.
participatorList
)
{
if
(
value
.
platform
!==
'outlook'
)
{
participatorList
.
push
(
value
)
participatorListId
.
push
(
value
.
userId
)
}
}
participatorListId
.
push
(
getApp
().
globalData
.
userid
)
this
.
data
.
outlookContact
.
forEach
(
item
=>
{
participatorListId
.
push
(
item
.
userId
)
})
participatorList
.
push
({
userId
:
getApp
().
globalData
.
userid
,
username
:
getApp
().
globalData
.
name
,
headUrl
:
getApp
().
globalData
.
avatar
,
platform
:
'dingtalk'
})
participatorList
.
push
(...
this
.
data
.
outlookContact
)
participatorList
=
this
.
setArrary
(
participatorList
)
// this.store.data.participatorList.push(...this.data.outlookContact)
// let participatorList = [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' }].concat(this.store.data.participatorList)
// this.store.data.participatorList = this.setArrary(participatorList)
this
.
setData
({
userList
:
participatorList
,
userId
:
[...
new
Set
(
participatorListId
)]
})
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
t
rue
)
{
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
participatorList
)
this
.
store
.
data
.
originUsers
=
participatorList
this
.
store
.
data
.
participatorList
=
participatorList
if
(
t
his
.
store
.
data
.
originalData
.
repeatable
===
1
)
{
this
.
setData
({
'conSelectPopupData.showSelectPopup'
:
true
})
}
else
{
let
addUserList
=
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
this
.
data
.
userList
).
addUserList
let
deleteUserList
=
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
this
.
data
.
userList
).
deleteUserList
let
dataUser
=
{
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
modifyModel
:
'only'
,
modifyContent
:
'operate_user'
}
this
.
modifySchedule
(
dataUser
)
}
}
else
{
this
.
store
.
data
.
participatorList
=
participatorList
this
.
update
()
dd
.
navigateBack
({
delta
:
1
})
}
this
.
update
()
dd
.
navigateBack
({
delta
:
1
},
// 选择弹窗
onSelectPopup
(
event
)
{
this
.
setData
({
'conSelectPopupData.showSelectPopup'
:
false
,
'conSelectPopupData.selectPopupId'
:
event
.
currentTarget
.
dataset
.
item
.
id
,
'centerPopup.showCenterPopup'
:
true
})
},
// 选择发不发通知
onSelectSend
(
event
)
{
this
.
setData
({
'centerPopup.showCenterPopup'
:
false
})
if
(
event
.
currentTarget
.
dataset
.
item
.
id
>
-
1
)
{
let
addUserList
=
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
this
.
data
.
userList
).
addUserList
let
deleteUserList
=
this
.
arrayPoor
(
this
.
store
.
data
.
originUsers
,
this
.
data
.
userListId
).
deleteUserList
let
dataUser
=
{
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
modifyModel
:
this
.
data
.
conSelectPopupData
.
selectPopupId
,
modifyContent
:
'operate_user'
}
this
.
modifySchedule
(
dataUser
,
event
.
currentTarget
.
dataset
.
item
.
id
)
}
else
{
this
.
operateUserE
(
false
)
}
},
// toast 消失之后的回调
onToastHidden
()
{
this
.
setData
({
'conToastData.showToast'
:
false
})
},
// 保存编辑
modifySchedule
(
data
,
needNotice
=
0
)
{
let
obj
=
{
needNotice
:
needNotice
,
scheduleId
:
this
.
data
.
scheduleItem
.
id
,
templateId
:
this
.
data
.
scheduleItem
.
scheduleTemplateId
,
planDate
:
this
.
data
.
scheduleItem
.
planDate
}
return
new
Promise
((
resolve
,
rejects
)
=>
{
modifySchedule
(
Object
.
assign
(
data
,
obj
)).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
this
.
store
.
data
.
indexNeedUpdate
=
true
this
.
update
()
this
.
setData
({
'conToastData.showToast'
:
true
,
'conToastData.title'
:
'保存成功'
})
if
(
this
.
store
.
data
.
originalData
.
repeatable
===
1
)
{
observer
.
notice
(
res
.
data
.
data
)
}
this
.
operateUserS
()
return
resolve
(
res
)
}
else
{
this
.
operateUserE
()
return
rejects
(
res
)
}
}).
catch
(
err
=>
{
this
.
operateUserE
()
return
rejects
(
err
)
})
})
},
// 数组取差值 原先的数组与现在的比较 增加与减少
...
...
@@ -157,12 +279,18 @@ create.Page({
let
conflictPeople
=
[]
for
(
let
value
in
res
.
data
.
data
)
{
if
(
!!
this
.
data
.
scheduleItem
)
{
if
(
res
.
data
.
data
[
value
].
length
>
1
)
{
const
arr
=
res
.
data
.
data
[
value
].
filter
(
function
(
item
)
{
return
item
.
confirmAttendance
===
1
})
if
(
arr
.
length
>
1
)
{
conflictPeople
.
push
(
value
)
}
}
else
{
if
(
res
.
data
.
data
[
value
].
length
>
0
)
{
const
arr
=
res
.
data
.
data
[
value
].
filter
(
function
(
item
)
{
return
item
.
confirmAttendance
===
1
})
if
(
arr
.
length
>
1
)
{
conflictPeople
.
push
(
value
)
}
}
...
...
@@ -172,5 +300,40 @@ create.Page({
conflictPeople
:
conflictPeople
})
})
}
},
// onSelectPopupCancel 点击取消
onSelectPopupCancel
()
{
this
.
setData
({
'conSelectPopupData.showSelectPopup'
:
false
,
'centerPopup.showCenterPopup'
:
false
})
this
.
operateUserE
(
false
)
},
// 参会人修改成功
operateUserS
()
{
this
.
store
.
data
.
participatorList
=
this
.
data
.
userList
this
.
store
.
data
.
participatorUserId
=
this
.
data
.
userListId
this
.
store
.
data
.
indexNeedUpdate
=
true
this
.
store
.
data
.
originUsers
=
this
.
store
.
data
.
participatorList
this
.
store
.
data
.
originUsersId
=
this
.
store
.
data
.
participatorUserId
this
.
update
()
dd
.
navigateBack
({
delta
:
1
})
},
// 参会人修改失败
operateUserE
(
x
=
true
)
{
if
(
x
)
{
this
.
setData
({
'conToastData.showToast'
:
true
,
'conToastData.title'
:
'保存失败'
})
}
},
// 页面卸载
onUnload
()
{
// 页面被关闭
observer
.
unregister
()
},
});
pages/outLookContact/outLookContact.json
View file @
dce367d5
{
"defaultTitle"
:
"添加邮箱联系人"
"defaultTitle"
:
"添加邮箱联系人"
,
"usingComponents"
:
{
"popup"
:
"../../components/popup/index"
,
"list"
:
"../../components/list/list"
,
"hlist"
:
"../../components/hList/hList"
,
"toast"
:
"../../components/toast/toast"
,
"selectpopup"
:
"../../components/selectPopup/selectPopup"
,
"centerpopup"
:
"../../components/centerPopup/centerPopup"
,
"meeting-time-picker"
:
"../../components/meetingTimePicker/meetingTimePicker"
}
}
\ No newline at end of file
pages/participantsDetail/participantsDetail.acss
View file @
dce367d5
...
...
@@ -82,4 +82,8 @@ page {
color: #8E939D;
vertical-align: middle;
margin-right: 10rpx;
}
.peopleList:last-of-type .info {
border: none
}
\ No newline at end of file
pages/participantsDetail/participantsDetail.axml
View file @
dce367d5
<view>
<view class="peopleList" a:for="{{participatorList}}" a:for-item="item">
<view class="headImg">
<image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/>
<text a:else>{{item.username.substring(0, 1)}}</text>
<text a:if="{{conflictPeople.includes(item.userId)}}" class="conflict iconicon_conflict iconfont"></text>
</view>
<view class="info">
<text class="name">{{item.username}}</text>
<text class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
<view class="participantsDetail">
<view class="peopleContaint">
<view class="peopleList" a:for="{{participatorList}}" a:for-item="item">
<view class="headImg">
<image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/>
<text a:else>{{item.username.substring(0, 1)}}</text>
<text a:if="{{conflictPeople.includes(item.userId)}}" class="conflict iconicon_conflict iconfont"></text>
</view>
<view class="info">
<text class="name">{{item.username}}</text>
<text a:if="{{!!scheduleItem ? !(item.userId == originalData || originUsersId.includes(item.userId)) : !(item.userId == originalData)}}" class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
</view>
</view>
</view>
<view class="addParticipants" catchTap="showPopup">
...
...
pages/participantsDetail/participantsDetail.js
View file @
dce367d5
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
{
modifySchedule
,
addSchedule
,
getUserScheduleInTime
,
getHomeUserSchedule
}
from
'../../api/request.js'
import
{
observer
}
from
'/utils/observer.js'
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
...
...
@@ -39,6 +40,7 @@ create.Page({
},
},
onLoad
(
event
)
{
const
_that
=
this
if
(
event
.
scheduleItem
)
{
let
scheduleItem
=
JSON
.
parse
(
event
.
scheduleItem
)
this
.
setData
({
...
...
@@ -48,7 +50,14 @@ create.Page({
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
store
.
data
.
participatorList
.
length
}
人)`
})
observer
.
register
({
notice
(
scheduleItem
)
{
_that
.
setData
({
'scheduleItem.scheduleTemplateId'
:
scheduleItem
})
console
.
log
(
scheduleItem
);
}
})
this
.
conflictPeople
()
},
// 关闭popup 点击mark
...
...
@@ -186,7 +195,7 @@ create.Page({
let
dataUser
=
{
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
modifyModel
:
'only'
,
modifyModel
:
this
.
data
.
conSelectPopupData
.
selectPopupId
,
modifyContent
:
'operate_user'
}
this
.
modifySchedule
(
dataUser
,
event
.
currentTarget
.
dataset
.
item
.
id
)
...
...
@@ -196,7 +205,8 @@ create.Page({
},
// 参会人修改成功
operateUserS
()
{
this
.
store
.
data
.
originUsers
=
this
.
store
.
data
.
participator
this
.
store
.
data
.
indexNeedUpdate
=
true
this
.
store
.
data
.
originUsers
=
this
.
store
.
data
.
participatorList
this
.
store
.
data
.
originUsersId
=
this
.
store
.
data
.
participatorUserId
this
.
update
()
},
...
...
@@ -225,6 +235,8 @@ create.Page({
return
new
Promise
((
resolve
,
rejects
)
=>
{
modifySchedule
(
Object
.
assign
(
data
,
obj
)).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
this
.
store
.
data
.
indexNeedUpdate
=
true
this
.
update
()
this
.
setData
({
'conToastData.showToast'
:
true
,
'conToastData.title'
:
'保存成功'
...
...
@@ -273,17 +285,57 @@ create.Page({
},
// 删除参会人
delParticipants
(
event
)
{
const
_that
=
this
if
(
!!
this
.
data
.
scheduleItem
)
{
dd
.
confirm
({
title
:
'删除参会人'
,
content
:
'确认删除参会人吗?'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
success
:
(
success
)
=>
{
if
(
!!
success
.
confirm
)
{
if
(
!!
_that
.
store
.
data
.
originalData
.
repeatable
)
{
_that
.
delete
(
event
)
_that
.
setData
({
'conSelectPopupData.showSelectPopup'
:
true
})
}
else
{
_that
.
delete
(
event
)
let
addUserList
=
_that
.
arrayPoor
(
_that
.
store
.
data
.
originUsers
,
_that
.
store
.
data
.
participatorList
).
addUserList
let
deleteUserList
=
_that
.
arrayPoor
(
_that
.
store
.
data
.
originUsers
,
_that
.
store
.
data
.
participatorList
).
deleteUserList
let
dataUser
=
{
addUserList
:
addUserList
,
deleteUserList
:
deleteUserList
,
modifyModel
:
'only'
,
modifyContent
:
'operate_user'
}
_that
.
modifySchedule
(
dataUser
)
}
}
}
})
}
else
{
this
.
delete
()
}
},
// 删除操作
delete
(
event
)
{
let
userId
=
event
.
target
.
dataset
.
userId
this
.
store
.
data
.
participatorList
.
forEach
((
item
,
index
)
=>
{
if
(
userId
===
item
.
userId
)
{
this
.
store
.
data
.
participatorList
.
splice
(
index
,
1
)
let
participatorList
=
[...
this
.
store
.
data
.
participatorList
]
participatorList
.
splice
(
index
,
1
)
this
.
store
.
data
.
participatorList
=
participatorList
this
.
update
()
return
}
})
this
.
store
.
data
.
participatorUserId
.
forEach
((
item
,
index
)
=>
{
if
(
userId
===
item
)
{
this
.
store
.
data
.
participatorUserId
.
splice
(
index
,
1
)
let
participatorUserId
=
[...
this
.
store
.
data
.
participatorUserId
]
participatorUserId
.
splice
(
index
,
1
)
this
.
store
.
data
.
participatorUserId
=
participatorUserId
this
.
update
()
return
}
...
...
@@ -331,7 +383,6 @@ create.Page({
conflictPeople
.
push
(
value
)
}
}
}
this
.
setData
({
conflictPeople
:
conflictPeople
...
...
@@ -352,5 +403,10 @@ create.Page({
requiredUsers
:
req
,
pickedUsers
:
pic
}
}
},
// 页面卸载
onUnload
()
{
// 页面被关闭
observer
.
unregister
()
},
});
pages/place/place.axml
View file @
dce367d5
...
...
@@ -12,20 +12,20 @@
暂无可用会议室
</view>
<block a:for="{{availableMeetingRoom}}">
<view class="mettingRoom" data-locationName="{{item.meetingRoomFullName}}" data-locationid="{{item.meetingRoomId}}" onTap="selectMeetingRoom">
<view class="icon iconfont iconhuiyishi2">
<view class="mettingRoom" data-locationName="{{item.meetingRoomFullName
? item.meetingRoomFullName : item.name
}}" data-locationid="{{item.meetingRoomId}}" onTap="selectMeetingRoom">
<view class="icon iconfont icon
icon_room icon
huiyishi2">
</view>
<view class="mettingRoomRight">
<view class="name">
{{item.meetingRoomFullName}}
{{item.meetingRoomFullName
? item.meetingRoomFullName : item.name
}}
</view>
<view class="mettingRoomDetail">
<view class="num">
<text class="numIcon iconfont iconcanhuiren"></text>
<text class="numIcon iconfont iconcanhuiren
iconicon_attender
"></text>
<text>{{item.capacityNum}}</text>
</view>
<view class="equipment" a:if="{{item.equipFacilityLabelList}}">
<text class="iconfont iconshebei" style="margin-right: 9rpx;"></text>
<text class="iconfont iconshebei
iconicon_attender
" style="margin-right: 9rpx;"></text>
<text a:for="{{item.equipFacilityLabelList}}" a:for-item="equipmentList">{{equipmentList.name}}</text>
</view>
</view>
...
...
pages/place/place.js
View file @
dce367d5
...
...
@@ -123,7 +123,7 @@ create.Page({
this
.
modifySchedule
(
data
,
event
.
currentTarget
.
dataset
.
item
.
id
).
then
(
res
=>
{
this
.
editLocationS
()
}).
catch
(
err
=>
{
this
.
editLocationE
()
this
.
editLocationE
(
true
)
})
}
else
{
this
.
editLocationE
(
false
)
...
...
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