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
98c23655
Commit
98c23655
authored
Feb 14, 2020
by
liang ce
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.roboming.com/fengzhaoyu/schedule
parents
7ca31239
5729d18a
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
313 additions
and
64 deletions
+313
-64
http.js
api/http.js
+4
-6
request.js
api/request.js
+9
-0
app.js
app.js
+1
-0
app.json
app.json
+2
-1
attendingSituation.acss
pages/attendingSituation/attendingSituation.acss
+91
-0
attendingSituation.axml
pages/attendingSituation/attendingSituation.axml
+31
-0
attendingSituation.js
pages/attendingSituation/attendingSituation.js
+13
-0
attendingSituation.json
pages/attendingSituation/attendingSituation.json
+2
-0
createOrEditSchedule.acss
pages/createOrEditSchedule/createOrEditSchedule.acss
+3
-0
createOrEditSchedule.axml
pages/createOrEditSchedule/createOrEditSchedule.axml
+17
-16
createOrEditSchedule.js
pages/createOrEditSchedule/createOrEditSchedule.js
+32
-18
participantsDetail.js
pages/participantsDetail/participantsDetail.js
+30
-6
scheduleDetail.acss
pages/scheduleDetail/scheduleDetail.acss
+6
-1
scheduleDetail.axml
pages/scheduleDetail/scheduleDetail.axml
+17
-15
scheduleDetail.js
pages/scheduleDetail/scheduleDetail.js
+54
-1
exampleStore.js
stores/exampleStore.js
+1
-0
No files found.
api/http.js
View file @
98c23655
...
@@ -2,7 +2,6 @@ import { login } from './login'
...
@@ -2,7 +2,6 @@ import { login } from './login'
export
default
function
http
(
data
)
{
export
default
function
http
(
data
)
{
if
(
getApp
().
globalData
.
token
!==
''
)
{
if
(
getApp
().
globalData
.
token
!==
''
)
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
console
.
log
(
data
)
dd
.
httpRequest
({
dd
.
httpRequest
({
headers
:
{
headers
:
{
// "Content-Type": `${ data.method === 'POST' ? 'application/x-www-form-urlencoded' : 'application/json' }`,
// "Content-Type": `${ data.method === 'POST' ? 'application/x-www-form-urlencoded' : 'application/json' }`,
...
@@ -17,6 +16,7 @@ export default function http (data) {
...
@@ -17,6 +16,7 @@ export default function http (data) {
resolve
(
res
)
resolve
(
res
)
},
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
rejects
(
res
)
console
.
log
(
res
)
console
.
log
(
res
)
}
}
})
})
...
@@ -25,11 +25,9 @@ export default function http (data) {
...
@@ -25,11 +25,9 @@ export default function http (data) {
return
new
Promise
((
resolve
,
rejects
)
=>
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
login
().
then
(
res
=>
{
login
().
then
(
res
=>
{
getApp
().
globalData
.
token
=
res
.
data
.
data
.
accessToken
.
access_token
//'3a025eee-15ae-4805-9214-fe0599d47f17' //
getApp
().
globalData
.
token
=
res
.
data
.
data
.
accessToken
.
access_token
//'3a025eee-15ae-4805-9214-fe0599d47f17' //
// getApp().globalData.token = 'b1b2c5fd-1706-4c35-91ee-683b6397ad37' //'3a025eee-15ae-4805-9214-fe0599d47f17' //
getApp
().
globalData
.
name
=
res
.
data
.
data
.
oapiUser
.
name
// getApp().globalData.name = res.data.data.oapiUser.name
getApp
().
globalData
.
userid
=
res
.
data
.
data
.
oapiUser
.
userid
// getApp().globalData.userid = res.data.data.oapiUser.userid
getApp
().
globalData
.
avatar
=
res
.
data
.
data
.
oapiUser
.
avatar
// getApp().globalData.avatar = res.data.data.oapiUser.avatar
console
.
log
(
`
${
getApp
().
globalData
.
globalUrl
}${
data
.
url
}
`
)
dd
.
httpRequest
({
dd
.
httpRequest
({
headers
:
{
headers
:
{
"Content-Type"
:
"application/json"
,
"Content-Type"
:
"application/json"
,
...
...
api/request.js
View file @
98c23655
...
@@ -169,4 +169,12 @@ export function getUserScheduleInTime (data) {
...
@@ -169,4 +169,12 @@ export function getUserScheduleInTime (data) {
data
:
JSON
.
stringify
(
data
),
data
:
JSON
.
stringify
(
data
),
url
:
`/meet/schedule/getUserScheduleInTime`
url
:
`/meet/schedule/getUserScheduleInTime`
})
})
}
// 获取日程详情
export
function
getScheduleDetail
(
data
)
{
return
$http
({
method
:
'post'
,
data
:
JSON
.
stringify
(
data
),
url
:
`/meet/schedule/getScheduleDetail`
})
}
}
\ No newline at end of file
app.js
View file @
98c23655
...
@@ -16,6 +16,7 @@ App({
...
@@ -16,6 +16,7 @@ App({
name
:
''
,
name
:
''
,
// globalUrl:'https://gateway.mingwork.com', // 线上地址
// globalUrl:'https://gateway.mingwork.com', // 线上地址
globalUrl
:
'https://gateway-beta.mingwork.com'
//beta地址
globalUrl
:
'https://gateway-beta.mingwork.com'
//beta地址
// globalUrl:'http://139.196.213.18:9999' //beta地址
// globalUrl:'http://192.168.1.101:9999', //beta地址
// globalUrl:'http://192.168.1.101:9999', //beta地址
// globalUrl:'http://192.168.1.102:9999' //beta地址
// globalUrl:'http://192.168.1.102:9999' //beta地址
// 106,112,102
// 106,112,102
...
...
app.json
View file @
98c23655
{
{
"pages"
:
[
"pages"
:
[
"pages/index/index"
,
"pages/index/index"
,
"pages/createOrEditSchedule/createOrEditSchedule"
,
"pages/scheduleDetail/scheduleDetail"
,
"pages/scheduleDetail/scheduleDetail"
,
"pages/attendingSituation/attendingSituation"
,
"pages/createOrEditSchedule/createOrEditSchedule"
,
"pages/place/place"
,
"pages/place/place"
,
"pages/participantsDetail/participantsDetail"
"pages/participantsDetail/participantsDetail"
],
],
...
...
pages/attendingSituation/attendingSituation.acss
0 → 100644
View file @
98c23655
@import "../../font/iconfont.acss";
page {
background: #f6f6f6;
font-family: PingFangSC-Regular;
font-size: 30rpx;
color: #191F25;
padding-bottom: 128rpx;
}
.list {
background: #fff;
height: 112rpx;
line-height: 112rpx;
display: flex;
padding-left: 32rpx;
}
.headImg {
position: relative;
margin-right: 24rpx;
margin-top: 24rpx;
width: 64rpx;
height: 64rpx;
background: #3296FA;
border-radius: 50%;
color: white;
line-height: 64rpx;
text-align: center;
}
.headImg image {
vertical-align: middle;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
}
.info {
width: 630rpx;
line-height: 112rpx;
height: 112rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.close {
position: absolute;
right: 32rpx;
color: #D8D8D8;
}
.button {
position: fixed;
bottom: 0;
display: flex;
margin-left: 32rpx;
padding-bottom: 32rpx;
background: white;
}
.button view {
width: 335rpx;
height: 96rpx;
border: 1px solid #3296FA;
border-radius: 48px;
text-align: center;
line-height: 96rpx;
font-size: 36rpx;
}
.add {
color: #0080FF;
margin-right: 16rpx;
}
.button .save {
color: white;
background: #3296FA;
border: 1px solid rgba(25, 31, 37, 0.12);
}
.tip {
text-align: center;
line-height: 20rpx;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background: #F25643;
position: absolute;
bottom: 4rpx;
right: -2rpx;
}
\ No newline at end of file
pages/attendingSituation/attendingSituation.axml
0 → 100644
View file @
98c23655
<view>
<view class="list">
<view class="headImg">
<image mode="scaleToFill" src=""/>
<text class="tip"></text>
<!-- <text >dddd</text> -->
</view>
<view class="info">
<text class="name">哈哈哈哈1</text>
</view>
</view>
<view class="list">
<view class="headImg">
<image mode="scaleToFill" src=""/>
<!-- <text >dddd</text> -->
</view>
<view class="info">
<text class="name">哈哈哈哈1</text>
</view>
</view>
<view class="list">
<view class="headImg">
<image mode="scaleToFill" src=""/>
<!-- <text >dddd</text> -->
</view>
<view class="info">
<text class="name">哈哈哈哈1</text>
</view>
</view>
</view>
\ No newline at end of file
pages/attendingSituation/attendingSituation.js
0 → 100644
View file @
98c23655
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
data
:
{
},
onLoad
()
{
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
store
.
data
.
participatorList
.
length
}
人)`
})
},
});
pages/attendingSituation/attendingSituation.json
0 → 100644
View file @
98c23655
{}
\ No newline at end of file
pages/createOrEditSchedule/createOrEditSchedule.acss
View file @
98c23655
...
@@ -262,3 +262,6 @@ page {
...
@@ -262,3 +262,6 @@ page {
color: rgba(25, 31, 37, 0.28);
color: rgba(25, 31, 37, 0.28);
}
}
.conflict {
margin-right: 10rpx;
}
pages/createOrEditSchedule/createOrEditSchedule.axml
View file @
98c23655
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<view class="weekTime">
<view class="weekTime">
{{week1}}
{{week1}}
</view>
</view>
<!--
<view class="line {{!!timeStaus ? 'selectLine' : ''}}"> -->
<!--<view class="line {{!!timeStaus ? 'selectLine' : ''}}"> -->
</view>
</view>
<view class="endTime {{timeStaus === '1' ? 'selectTime' : ''}}" data-timeStaus="1" onTap="selectTime">
<view class="endTime {{timeStaus === '1' ? 'selectTime' : ''}}" data-timeStaus="1" onTap="selectTime">
<view class="timeContainer">
<view class="timeContainer">
...
@@ -39,12 +39,12 @@
...
@@ -39,12 +39,12 @@
<view class="icon iconfont icondingwei">
<view class="icon iconfont icondingwei">
</view>
</view>
<view class="text" data-nextPage="place" onTap="nextPage">
<view class="text" data-nextPage="place" onTap="nextPage">
<view class="selectPlace" a:if="{{!!locationName}}">
<view class="selectPlace" a:if="{{!!locationName}}">
<text>{{locationName}}</text>
<text>{{locationName}}</text>
<text class="iconshanchu iconfont" catchTap="closePlace"></text>
<text class="iconshanchu iconfont" catchTap="closePlace"></text>
</view>
</view>
<text a:else>添加地点</text>
<text a:else>添加地点
</text>
</view>
</view>
</view>
</view>
<!-- 参会人 -->
<!-- 参会人 -->
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/>
<image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/>
<text a:else class="name">{{item.username.substring(item.username.length - 2, item.username.length)}}</text>
<text a:else class="name">{{item.username.substring(item.username.length - 2, item.username.length)}}</text>
</text>
</text>
<text a:if=
{{conflictPeople.indexOf(item.userId)>-1}}
class="conflictTip"></text>
<text a:if=
"{{conflictPeople.includes(item.userId)}}"
class="conflictTip"></text>
</text>
</text>
</view>
</view>
<view class="addPeople iconfont icontianjia" onTap="addParticipants">
<view class="addPeople iconfont icontianjia" onTap="addParticipants">
...
@@ -71,10 +71,11 @@
...
@@ -71,10 +71,11 @@
</view>
</view>
</view>
</view>
<view class="tip">
<view class="tip">
<text class="noConflict" a:if="conflictPeope === []">
<text class="noConflict" a:if="{{!conflictPeople.length}}">
所有参与者都有空</text>
所有参与者都有空
</text>
<text class="conflict" a:else>
<text class="conflict" a:else>
<text a:if="{{conflictPeople.indexOf(list.userId)>-1}}" a:for="{{participatorList}}" a:for-list="item">{{list
.username}}</text> 会议冲突
<text class="conflict" a:if="{{conflictPeople.includes(item.userId)}}" a:for="{{participatorList}}" a:for-item="item">{{item
.username}}</text> 会议冲突
</text>
</text>
</view>
</view>
</view>
</view>
...
@@ -86,7 +87,9 @@
...
@@ -86,7 +87,9 @@
<view class="icon iconfont iconfont iconhuiqiantixing">
<view class="icon iconfont iconfont iconhuiqiantixing">
</view>
</view>
<view class="text">
<view class="text">
<text>提前15分钟提醒</text>
<text>
提前15分钟提醒
</text>
<text class="close iconshanchu iconfont"></text>
<text class="close iconshanchu iconfont"></text>
</view>
</view>
</view>
</view>
...
@@ -98,6 +101,4 @@
...
@@ -98,6 +101,4 @@
</view>
</view>
</view>
</view>
<mw-modal isShowModal="{{isShowModal}}" time="{{propsTime}}" onChange="changeSelectTime">
<mw-modal isShowModal="{{isShowModal}}" time="{{propsTime}}" onChange="changeSelectTime">
</mw-modal>
</mw-modal>
\ No newline at end of file
<!-- <mw-message visible="{true}" onDmMessageHide="onDmMessageHide" type="{{type}}" content="{{content}}" duration="800"></mw-message> -->
\ No newline at end of file
pages/createOrEditSchedule/createOrEditSchedule.js
View file @
98c23655
import
create
from
'dd-store'
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
exampleStore
from
'/stores/exampleStore'
import
{
saveMettingRoom
,
getUserScheduleInTime
}
from
'../../api/request'
import
{
addSchedule
,
getUserScheduleInTime
,
getHomeUserSchedule
}
from
'../../api/request.js'
import
{
stringify
}
from
'querystring'
;
create
.
Page
({
create
.
Page
({
store
:
exampleStore
,
store
:
exampleStore
,
useAll
:
true
,
useAll
:
true
,
...
@@ -13,12 +14,12 @@ create.Page({
...
@@ -13,12 +14,12 @@ create.Page({
time2
:
''
,
time2
:
''
,
week2
:
''
,
week2
:
''
,
propsTime
:
''
,
propsTime
:
''
,
conflictPeople
:
[]
},
},
onLoad
()
{
onLoad
()
{
this
.
store
.
data
.
conflictPeople
=
[]
this
.
store
.
data
.
participatorList
=
[]
this
.
store
.
data
.
participatorList
=
[]
this
.
store
.
data
.
locationName
=
''
this
.
store
.
data
.
locationName
=
''
this
.
store
.
data
.
participatorUserId
=
[]
this
.
store
.
data
.
participatorUserId
=
[
getApp
().
globalData
.
userid
]
this
.
update
()
this
.
update
()
dd
.
setNavigationBar
({
dd
.
setNavigationBar
({
title
:
'创建会议'
title
:
'创建会议'
...
@@ -31,7 +32,6 @@ create.Page({
...
@@ -31,7 +32,6 @@ create.Page({
var
w
=
weekList
[
date
.
getDay
()];
var
w
=
weekList
[
date
.
getDay
()];
var
h
=
date
.
getHours
()
var
h
=
date
.
getHours
()
var
min
=
date
.
getMinutes
();
var
min
=
date
.
getMinutes
();
console
.
log
(
h
,
min
)
this
.
setData
({
this
.
setData
({
time1
:
`
${
y
}
/
${
m
}
/
${
d
}
${
h
<
10
?
"0"
+
date
.
getHours
()
:
date
.
getHours
()}
:
${
min
<
30
?
'00'
:
'30'
}
`
,
time1
:
`
${
y
}
/
${
m
}
/
${
d
}
${
h
<
10
?
"0"
+
date
.
getHours
()
:
date
.
getHours
()}
:
${
min
<
30
?
'00'
:
'30'
}
`
,
time2
:
`
${
y
}
/
${
m
}
/
${
d
}
${
min
<
30
?
h
<
10
?
"0"
+
date
.
getHours
()
:
date
.
getHours
()
:
(
h
+
1
)
<
10
?
"0"
+
(
date
.
getHours
()
+
1
)
:
date
.
getHours
()
+
1
}
:
${
min
<
30
?
'30'
:
'00'
}
`
,
time2
:
`
${
y
}
/
${
m
}
/
${
d
}
${
min
<
30
?
h
<
10
?
"0"
+
date
.
getHours
()
:
date
.
getHours
()
:
(
h
+
1
)
<
10
?
"0"
+
(
date
.
getHours
()
+
1
)
:
date
.
getHours
()
+
1
}
:
${
min
<
30
?
'30'
:
'00'
}
`
,
...
@@ -39,6 +39,13 @@ create.Page({
...
@@ -39,6 +39,13 @@ create.Page({
week2
:
w
,
week2
:
w
,
})
})
},
},
onShow
()
{
const
_that
=
this
setTimeout
(
function
()
{
_that
.
update
()
},
100
)
},
// 选择时间
// 选择时间
selectTime
(
event
)
{
selectTime
(
event
)
{
this
.
setData
({
this
.
setData
({
...
@@ -49,8 +56,8 @@ create.Page({
...
@@ -49,8 +56,8 @@ create.Page({
},
},
// 选择时间组件回调
// 选择时间组件回调
changeSelectTime
(
e
)
{
changeSelectTime
(
e
)
{
console
.
log
(
e
)
if
(
e
.
status
===
1
)
{
if
(
e
.
status
===
1
)
{
var
date1
=
new
Date
(
e
.
time
);
var
date1
=
new
Date
(
e
.
time
);
var
weekList
=
[
'周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
]
var
weekList
=
[
'周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
]
var
w1
=
weekList
[
date1
.
getDay
()];
var
w1
=
weekList
[
date1
.
getDay
()];
...
@@ -71,12 +78,15 @@ create.Page({
...
@@ -71,12 +78,15 @@ create.Page({
week1
:
w1
,
week1
:
w1
,
week2
:
w2
week2
:
w2
})
})
this
.
conflict
()
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
time1
:
e
.
time
,
time1
:
e
.
time
,
isShowModal
:
false
,
isShowModal
:
false
,
week1
:
w1
week1
:
w1
})
})
this
.
conflict
()
}
}
}
else
{
}
else
{
if
(
new
Date
(
e
.
time
).
getTime
()
<
new
Date
(
this
.
data
.
time1
).
getTime
())
{
if
(
new
Date
(
e
.
time
).
getTime
()
<
new
Date
(
this
.
data
.
time1
).
getTime
())
{
...
@@ -93,6 +103,7 @@ create.Page({
...
@@ -93,6 +103,7 @@ create.Page({
isShowModal
:
false
,
isShowModal
:
false
,
week2
:
w1
week2
:
w1
})
})
this
.
conflict
()
}
}
}
}
}
else
{
}
else
{
...
@@ -124,7 +135,6 @@ create.Page({
...
@@ -124,7 +135,6 @@ create.Page({
res
.
users
.
forEach
((
item
,
index
)
=>
{
res
.
users
.
forEach
((
item
,
index
)
=>
{
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
headUrl
:
item
.
headUrl
})
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
headUrl
:
item
.
headUrl
})
_that
.
store
.
data
.
participatorUserId
.
push
(
item
.
userId
)
_that
.
store
.
data
.
participatorUserId
.
push
(
item
.
userId
)
})
})
_that
.
store
.
data
.
participatorList
=
_that
.
setArrary
(
_that
.
store
.
data
.
participatorList
)
_that
.
store
.
data
.
participatorList
=
_that
.
setArrary
(
_that
.
store
.
data
.
participatorList
)
_that
.
store
.
data
.
participatorUserId
=
[...
new
Set
(
_that
.
store
.
data
.
participatorUserId
)]
_that
.
store
.
data
.
participatorUserId
=
[...
new
Set
(
_that
.
store
.
data
.
participatorUserId
)]
...
@@ -137,9 +147,13 @@ create.Page({
...
@@ -137,9 +147,13 @@ create.Page({
},
},
// 跳转下一页
// 跳转下一页
nextPage
(
event
)
{
nextPage
(
event
)
{
let
time
=
{
time1
:
this
.
data
.
time1
,
time2
:
this
.
data
.
time2
}
switch
(
event
.
target
.
dataset
.
nextPage
)
{
switch
(
event
.
target
.
dataset
.
nextPage
)
{
case
'participantsDetail'
:
case
'participantsDetail'
:
dd
.
navigateTo
({
url
:
'./../participantsDetail/participantsDetail'
})
dd
.
navigateTo
({
url
:
`./../participantsDetail/participantsDetail?time=
${
JSON
.
stringify
(
time
)}
`
})
break
;
break
;
case
'place'
:
case
'place'
:
dd
.
navigateTo
({
url
:
'./../place/place'
})
dd
.
navigateTo
({
url
:
'./../place/place'
})
...
@@ -163,11 +177,11 @@ create.Page({
...
@@ -163,11 +177,11 @@ create.Page({
latitude
:
'10'
,
latitude
:
'10'
,
locationName
:
this
.
store
.
data
.
locationName
||
''
locationName
:
this
.
store
.
data
.
locationName
||
''
},
},
startTime
:
`
${
this
.
data
.
time1
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
startTime
:
`
${
this
.
data
.
time1
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
endTime
:
`
${
this
.
data
.
time2
.
replace
(
/
\/
/g
,
'-'
)}
:00`
,
endTime
:
`
${
this
.
data
.
time2
.
replace
(
/
\/
/g
,
'-'
)}
:00`
,
scheduleType
:
'common'
,
scheduleType
:
'common'
,
noticeType
:
'dd_notice'
,
noticeType
:
'dd_notice'
,
participatorList
:
this
.
store
.
participatorList
,
participatorList
:
this
.
store
.
data
.
participatorList
,
repeatable
:
0
,
repeatable
:
0
,
aheadTimes
:
[],
aheadTimes
:
[],
recurrenceModel
:
{
recurrenceModel
:
{
...
@@ -175,7 +189,7 @@ create.Page({
...
@@ -175,7 +189,7 @@ create.Page({
},
},
meetingRoomId
:
222
||
null
meetingRoomId
:
222
||
null
}
}
saveMettingRoom
(
data
).
then
(
res
=>
{
addSchedule
(
data
).
then
(
res
=>
{
dd
.
navigateBack
({
dd
.
navigateBack
({
delta
:
1
delta
:
1
})
})
...
@@ -190,19 +204,19 @@ create.Page({
...
@@ -190,19 +204,19 @@ create.Page({
},
},
// 会议冲突
// 会议冲突
conflict
()
{
conflict
()
{
this
.
store
.
data
.
conflictPeople
=
[]
let
data
=
{
let
data
=
{
startTime
:
`
${
this
.
data
.
time1
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
startTime
:
`
${
this
.
data
.
time1
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
endTime
:
`
${
this
.
data
.
time2
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
endTime
:
`
${
this
.
data
.
time2
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
userIds
:
this
.
store
.
data
.
participatorUserId
userIds
:
this
.
store
.
data
.
participatorUserId
}
}
getUserScheduleInTime
(
data
).
then
(
res
=>
{
getUserScheduleInTime
(
data
).
then
(
res
=>
{
for
(
let
value
in
res
.
data
.
data
)
{
for
(
let
value
in
res
.
data
.
data
)
{
if
(
res
.
data
.
data
[
value
]
===
[]
)
{
if
(
!!
res
.
data
.
data
[
value
].
length
)
{
conflictPeople
.
push
(
value
)
this
.
store
.
data
.
conflictPeople
.
push
(
value
)
}
}
}
}
this
.
update
()
})
})
}
}
});
});
pages/participantsDetail/participantsDetail.js
View file @
98c23655
import
create
from
'dd-store'
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
exampleStore
from
'/stores/exampleStore'
import
{
addSchedule
,
getUserScheduleInTime
,
getHomeUserSchedule
}
from
'../../api/request.js'
create
.
Page
({
create
.
Page
({
store
:
exampleStore
,
store
:
exampleStore
,
useAll
:
true
,
useAll
:
true
,
time1
:
''
,
time2
:
''
,
data
:
{
data
:
{
},
},
onLoad
()
{
onLoad
(
event
)
{
console
.
log
(
JSON
.
parse
(
event
.
time
))
this
.
setData
({
time1
:
event
.
time1
,
time2
:
event
.
time1
})
dd
.
setNavigationBar
({
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
store
.
data
.
participatorList
.
length
}
人)`
title
:
`参会人(
${
this
.
store
.
data
.
participatorList
.
length
}
人)`
})
})
...
@@ -13,10 +21,7 @@ create.Page({
...
@@ -13,10 +21,7 @@ create.Page({
},
},
// 保存信息
// 保存信息
saveInfo
()
{
saveInfo
()
{
dd
.
navigateBack
({
this
.
conflict
()
delta
:
1
})
},
},
// 添加参会人
// 添加参会人
addParticipants
()
{
addParticipants
()
{
...
@@ -66,7 +71,6 @@ create.Page({
...
@@ -66,7 +71,6 @@ create.Page({
dd
.
setNavigationBar
({
dd
.
setNavigationBar
({
title
:
`参会人(
${
this
.
store
.
data
.
participatorList
.
length
}
人)`
title
:
`参会人(
${
this
.
store
.
data
.
participatorList
.
length
}
人)`
})
})
},
},
// 数组去重
// 数组去重
setArrary
(
arr
,
userId
)
{
setArrary
(
arr
,
userId
)
{
...
@@ -77,4 +81,24 @@ create.Page({
...
@@ -77,4 +81,24 @@ create.Page({
}
}
return
Object
.
values
(
containt
)
return
Object
.
values
(
containt
)
},
},
// 会议冲突
conflict
()
{
this
.
store
.
data
.
conflictPeople
=
[]
let
data
=
{
startTime
:
`
${
this
.
data
.
time1
}
:00`
,
endTime
:
`
${
this
.
data
.
time2
}
:00`
,
userIds
:
this
.
store
.
data
.
participatorUserId
}
getUserScheduleInTime
(
data
).
then
(
res
=>
{
for
(
let
value
in
res
.
data
.
data
)
{
if
(
!!
res
.
data
.
data
[
value
].
length
)
{
this
.
store
.
data
.
conflictPeople
.
push
(
value
)
}
}
this
.
update
()
dd
.
navigateBack
({
delta
:
1
})
})
}
});
});
pages/scheduleDetail/scheduleDetail.acss
View file @
98c23655
...
@@ -59,7 +59,12 @@ page {
...
@@ -59,7 +59,12 @@ page {
max-width: 400rpx;
max-width: 400rpx;
}
}
.scroll>image {
.scroll .imageGroup {
font-size: 24rpx;
color: #fff;
text-align: center;
line-height: 58rpx;
display: inline-block;
vertical-align: top;
vertical-align: top;
border-radius: 50%;
border-radius: 50%;
width: 58rpx;
width: 58rpx;
...
...
pages/scheduleDetail/scheduleDetail.axml
View file @
98c23655
...
@@ -4,21 +4,27 @@
...
@@ -4,21 +4,27 @@
<view class="icon icondidianmiaoshu iconfont">
<view class="icon icondidianmiaoshu iconfont">
</view>
</view>
<view class="text">
<view class="text">
产品技术评估
{{title}}
</view>
</view>
</view>
</view>
<view class="place">
<view class="place"
a:if="{{!!location.locationName}}"
>
<view class="icon icondingwei iconfont">
<view class="icon icondingwei iconfont">
</view>
</view>
<view class="text">
<view class="text">
西城广场星巴克
{{location.locationName}}
</view>
</view>
</view>
</view>
<view class="time">
<view class="time">
<view class="icon iconshijian iconfont">
<view class="icon iconshijian iconfont">
</view>
</view>
<view class="text">
<view class="text" a:if="{{isAcrossDay}}">
01月29日 周三 09:00-10:00
{{`
${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${startTime.substring(11, 16)} 至
${endTime.substring(5, 7)}月${endTime.substring(8, 10)}日 ${endTime.substring(11, 16)}
`}}
</view>
<view class="text" a:else>
{{`${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${week} ${startTime.substring(11, 16)}-${endTime.substring(11, 16)}`}}
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -26,14 +32,12 @@
...
@@ -26,14 +32,12 @@
<view class="icon iconcanhuiren1 iconfont">
<view class="icon iconcanhuiren1 iconfont">
</view>
</view>
<view class="scroll">
<view class="scroll">
<image mode="scaleToFill" src=""/>
<text class="imageGroup" a:for="{{userList}}" a:for-item="item">
<image mode="scaleToFill" src=""/>
<text>
<image mode="scaleToFill" src=""/>
<image a:if="{{!!item.participator.headUrl}}" mode="scaleToFill" src="{{item.participator.headUrl}}"/>
<image mode="scaleToFill" src=""/>
<text a:else class="name">{{item.participator.username.substring(item.participator.username.length - 2, item.participator.username.length)}}</text>
<image mode="scaleToFill" src=""/>
</text>
<image mode="scaleToFill" src=""/>
</text>
<image mode="scaleToFill" src=""/>
<image mode="scaleToFill" src=""/>
</view>
</view>
<view class="right">
<view class="right">
<text class="number">3人参与</text>
<text class="number">3人参与</text>
...
@@ -81,6 +85,5 @@
...
@@ -81,6 +85,5 @@
<text class="icondidianmiaoshu iconfont"></text>
<text class="icondidianmiaoshu iconfont"></text>
<text>编辑</text>
<text>编辑</text>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
pages/scheduleDetail/scheduleDetail.js
View file @
98c23655
import
{
getScheduleDetail
}
from
'../../api/request.js'
Page
({
Page
({
data
:
{},
data
:
{
title
:
''
,
location
:
''
,
startTime
:
''
,
endTime
:
''
,
weeks
:
[
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
,
'周日'
],
week
:
''
,
userList
:
[],
isAcrossDay
:
true
},
onLoad
()
{
onLoad
()
{
dd
.
setNavigationBar
({
dd
.
setNavigationBar
({
title
:
'会议详情'
title
:
'会议详情'
})
})
let
data
=
{
id
:
'1172'
}
getScheduleDetail
(
data
).
then
(
res
=>
{
this
.
setData
({
title
:
res
.
data
.
data
.
title
,
location
:
res
.
data
.
data
.
location
,
startTime
:
res
.
data
.
data
.
startTime
,
endTime
:
res
.
data
.
data
.
endTime
,
userList
:
res
.
data
.
data
.
userList
,
week
:
this
.
data
.
weeks
[
new
Date
(
res
.
data
.
data
.
startTime
).
getDay
()
-
1
]
})
this
.
acrossDay
(
res
.
data
.
data
.
startTime
,
res
.
data
.
data
.
endTime
)
})
},
// 是否跨天
acrossDay
(
time1
,
time2
)
{
console
.
log
(
this
.
dealTime
(
time1
))
console
.
log
(
this
.
dealTime
(
time2
))
let
isAcrossDay
=
''
if
(
JSON
.
stringify
(
this
.
dealTime
(
time1
))
===
JSON
.
stringify
(
this
.
dealTime
(
time2
)))
{
isAcrossDay
=
false
}
else
{
isAcrossDay
=
true
}
this
.
setData
({
isAcrossDay
:
isAcrossDay
})
},
},
// 处理时间
dealTime
(
time
)
{
let
time1
=
time
.
replace
(
/-/g
,
"/"
)
let
date
=
new
Date
(
time1
)
let
day
=
date
.
getDate
()
let
year
=
date
.
getFullYear
()
let
month
=
date
.
getMonth
()
+
1
return
{
year
:
year
,
month
:
month
,
day
:
day
}
}
});
});
stores/exampleStore.js
View file @
98c23655
...
@@ -2,6 +2,7 @@ class Store {
...
@@ -2,6 +2,7 @@ class Store {
data
=
{
data
=
{
participatorList
:
[],
// 参会人列表
participatorList
:
[],
// 参会人列表
locationName
:
''
,
locationName
:
''
,
conflictPeople
:
[],
participatorUserId
:
[],
// 参会人的userId
participatorUserId
:
[],
// 参会人的userId
}
}
...
...
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