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
01060816
Commit
01060816
authored
Feb 13, 2020
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
05dda8b2
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
26 deletions
+60
-26
http.js
api/http.js
+5
-5
request.js
api/request.js
+3
-2
app.js
app.js
+1
-0
createOrEditSchedule.acss
pages/createOrEditSchedule/createOrEditSchedule.acss
+3
-0
createOrEditSchedule.axml
pages/createOrEditSchedule/createOrEditSchedule.axml
+7
-4
createOrEditSchedule.js
pages/createOrEditSchedule/createOrEditSchedule.js
+40
-15
exampleStore.js
stores/exampleStore.js
+1
-0
No files found.
api/http.js
View file @
01060816
...
...
@@ -2,7 +2,6 @@ import { login } from './login'
export
default
function
http
(
data
)
{
if
(
getApp
().
globalData
.
token
!==
''
)
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
console
.
log
(
data
)
dd
.
httpRequest
({
headers
:
{
// "Content-Type": `${ data.method === 'POST' ? 'application/x-www-form-urlencoded' : 'application/json' }`,
...
...
@@ -17,6 +16,7 @@ export default function http (data) {
resolve
(
res
)
},
fail
:
function
(
res
)
{
rejects
(
res
)
console
.
log
(
res
)
}
})
...
...
@@ -25,10 +25,10 @@ export default function http (data) {
return
new
Promise
((
resolve
,
rejects
)
=>
{
login
().
then
(
res
=>
{
// 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.userid = res.data.data.oapiUser.userid
//
getApp().globalData.avatar = res.data.data.oapiUser.avatar
getApp
().
globalData
.
token
=
'
0a081219-f3ea-481c-a17d-19ea5b75da8d
'
//'3a025eee-15ae-4805-9214-fe0599d47f17' //
getApp
().
globalData
.
name
=
res
.
data
.
data
.
oapiUser
.
name
getApp
().
globalData
.
userid
=
res
.
data
.
data
.
oapiUser
.
userid
getApp
().
globalData
.
avatar
=
res
.
data
.
data
.
oapiUser
.
avatar
dd
.
httpRequest
({
headers
:
{
"Content-Type"
:
"application/json"
,
...
...
api/request.js
View file @
01060816
...
...
@@ -159,7 +159,7 @@ export function addSchedule (data) {
return
$http
({
method
:
'post'
,
data
:
JSON
.
stringify
(
data
),
url
:
`/meet/schedule/addSchedule
`
url
:
`/meet/schedule/addSchedule`
})
}
// 获取参会会人员的日程
...
...
@@ -167,6 +167,6 @@ export function getUserScheduleInTime (data) {
return
$http
({
method
:
'post'
,
data
:
JSON
.
stringify
(
data
),
url
:
`/meet/schedule/getUserScheduleInTime
`
url
:
`/meet/schedule/getUserScheduleInTime`
})
}
\ No newline at end of file
app.js
View file @
01060816
...
...
@@ -16,6 +16,7 @@ App({
name
:
''
,
// globalUrl:'https://gateway.mingwork.com', // 线上地址
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.102:9999' //beta地址
// 106,112,102
...
...
pages/createOrEditSchedule/createOrEditSchedule.acss
View file @
01060816
...
...
@@ -262,3 +262,6 @@ page {
color: rgba(25, 31, 37, 0.28);
}
.conflict {
margin-right: 10rpx;
}
pages/createOrEditSchedule/createOrEditSchedule.axml
View file @
01060816
...
...
@@ -60,7 +60,7 @@
<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>
<text a:if=
{{conflictPeople.indexOf(item.userId)>-1}}
class="conflictTip"></text>
<text a:if=
"{{conflictPeople.includes(item.userId)}}"
class="conflictTip"></text>
</text>
</view>
<view class="addPeople iconfont icontianjia" onTap="addParticipants">
...
...
@@ -71,10 +71,10 @@
</view>
</view>
<view class="tip">
<text class="noConflict" a:if="
conflictPeope === []
">
<text class="noConflict" a:if="
{{conflictPeope === []}}
">
所有参与者都有空</text>
<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>
</view>
</view>
...
...
@@ -86,7 +86,8 @@
<view class="icon iconfont iconfont iconhuiqiantixing">
</view>
<view class="text">
<text>提前15分钟提醒</text>
<text>提前15分钟提醒 {{conflictPeople.length}}
</text>
<text class="close iconshanchu iconfont"></text>
</view>
</view>
...
...
@@ -100,4 +101,5 @@
<mw-modal isShowModal="{{isShowModal}}" time="{{propsTime}}" onChange="changeSelectTime">
</mw-modal>
<!-- <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 @
01060816
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
{
saveMettingRoom
,
getUserScheduleInTime
}
from
'../../api/request'
// import { addSchedule, getUserScheduleInTime, getHomeUserSchedule } from '../../api/request.js'
import
{
getHomeUserSchedule
}
from
'../../api/request.js'
import
{
stringify
}
from
'querystring'
;
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
...
...
@@ -13,12 +16,26 @@ create.Page({
time2
:
''
,
week2
:
''
,
propsTime
:
''
,
conflictPeople
:
[]
},
onLoad
()
{
let
data
=
{
"startTime"
:
"2020-01-01 00:00:00"
,
"endTime"
:
"2025-12-30 23:59:59"
}
try
{
getHomeUserSchedule
(
data
).
then
(
res
=>
{
console
.
log
(
res
)
}).
catch
(
err
=>
{
console
.
log
(
111
)
})
}
catch
(
e
){
dd
.
alert
({
content
:
e
})
}
this
.
store
.
data
.
conflictPeople
=
[]
this
.
store
.
data
.
participatorList
=
[]
this
.
store
.
data
.
locationName
=
''
this
.
store
.
data
.
participatorUserId
=
[]
this
.
store
.
data
.
participatorUserId
=
[
getApp
().
globalData
.
userid
]
this
.
update
()
dd
.
setNavigationBar
({
title
:
'创建会议'
...
...
@@ -39,6 +56,13 @@ create.Page({
week2
:
w
,
})
},
onShow
()
{
const
_that
=
this
setTimeout
(
function
()
{
_that
.
update
()
},
100
)
},
// 选择时间
selectTime
(
event
)
{
this
.
setData
({
...
...
@@ -71,6 +95,7 @@ create.Page({
week1
:
w1
,
week2
:
w2
})
}
else
{
this
.
setData
({
time1
:
e
.
time
,
...
...
@@ -124,7 +149,6 @@ create.Page({
res
.
users
.
forEach
((
item
,
index
)
=>
{
_that
.
store
.
data
.
participatorList
.
push
({
userId
:
item
.
userId
,
username
:
item
.
name
,
headUrl
:
item
.
headUrl
})
_that
.
store
.
data
.
participatorUserId
.
push
(
item
.
userId
)
})
_that
.
store
.
data
.
participatorList
=
_that
.
setArrary
(
_that
.
store
.
data
.
participatorList
)
_that
.
store
.
data
.
participatorUserId
=
[...
new
Set
(
_that
.
store
.
data
.
participatorUserId
)]
...
...
@@ -163,11 +187,11 @@ create.Page({
latitude
:
'10'
,
locationName
:
this
.
store
.
data
.
locationName
||
''
},
startTime
:
`
${
this
.
data
.
time1
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
endTime
:
`
${
this
.
data
.
time2
.
replace
(
/
\/
/g
,
'-'
)}
:00`
,
startTime
:
`
${
this
.
data
.
time1
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
endTime
:
`
${
this
.
data
.
time2
.
replace
(
/
\/
/g
,
'-'
)}
:00`
,
scheduleType
:
'common'
,
noticeType
:
'dd_notice'
,
participatorList
:
this
.
store
.
participatorList
,
participatorList
:
this
.
store
.
data
.
participatorList
,
repeatable
:
0
,
aheadTimes
:
[],
recurrenceModel
:
{
...
...
@@ -175,7 +199,7 @@ create.Page({
},
meetingRoomId
:
222
||
null
}
saveMettingRoom
(
data
).
then
(
res
=>
{
getHomeUserSchedule
(
data
).
then
(
res
=>
{
dd
.
navigateBack
({
delta
:
1
})
...
...
@@ -191,18 +215,19 @@ create.Page({
// 会议冲突
conflict
()
{
let
data
=
{
startTime
:
`
${
this
.
data
.
time1
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
endTime
:
`
${
this
.
data
.
time2
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
startTime
:
`
${
this
.
data
.
time1
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
endTime
:
`
${
this
.
data
.
time2
.
replace
(
/
\/
/g
,
"-"
)}
:00`
,
userIds
:
this
.
store
.
data
.
participatorUserId
}
getUserScheduleInTime
(
data
).
then
(
res
=>
{
for
(
let
value
in
res
.
data
.
data
)
{
if
(
res
.
data
.
data
[
value
]
===
[]
)
{
conflictPeople
.
push
(
value
)
for
(
let
value
in
res
.
data
.
data
)
{
if
(
!!
res
.
data
.
data
[
value
].
length
)
{
this
.
store
.
data
.
conflictPeople
.
push
(
value
)
}
}
this
.
update
()
}).
catch
(
err
=>
{
dd
.
alert
({
content
:
'1'
})
})
}
});
stores/exampleStore.js
View file @
01060816
...
...
@@ -2,6 +2,7 @@ class Store {
data
=
{
participatorList
:
[],
// 参会人列表
locationName
:
''
,
conflictPeople
:
[],
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