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
a3b06815
Commit
a3b06815
authored
Oct 09, 2020
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/2.0.0' of
http://gitlab.roboming.com/fengzhaoyu/schedule
into release/2.0.0
parents
031e54ac
ec8c52ed
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
71 deletions
+85
-71
index.acss
pages/index/index.acss
+16
-1
index.axml
pages/index/index.axml
+5
-2
index.js
pages/index/index.js
+51
-64
meetingDetail.js
pages/meetingDetail/meetingDetail.js
+10
-4
tasks.js
pages/tasks/tasks.js
+3
-0
No files found.
pages/index/index.acss
View file @
a3b06815
...
...
@@ -38,6 +38,21 @@
align-items: center;
}
.unread-message {
position: absolute;
top: 48rpx;
right: 48rpx;
color: #fff;
background: #ea4e6b;
font-size: 24rpx;
height: 40rpx;
line-height: 40rpx;
padding: 0 16rpx;
border-radius: 20rpx;
display: flex;
justify-content: center;
}
.userDynamic {
margin-bottom: 34rpx;
}
...
...
@@ -50,7 +65,7 @@
margin-bottom: 24rpx;
}
.dynamicTime text{
.dynamicTime text
{
opacity: 0.56;
font-size: 26rpx;
color: #1B263D;
...
...
pages/index/index.axml
View file @
a3b06815
...
...
@@ -11,14 +11,17 @@
<view class="dynamicList">
<view a:for="{{dynamicList}}" class="dynamicContent" key="{{item.meetingId}}">
<view class="dynamicDetails">
<view class="meetingtitle" catchTap="nextDetail" data-item="{{item}}">
<view class="meetingtitle"
data-groupId="{{item.meetingId}}"
catchTap="nextDetail" data-item="{{item}}">
<view>
{{item.title}}
</view>
<view a:if="{{item.unReadMessageTotal}}" class="unread-message">
{{item.unReadMessageTotal}}
</view>
</view>
<block a:for="{{item.commentListDataModelList}}" a:for-item="dynamicItem" key="{{item.id}}">
<view class="userDynamic">
<view class="dynamicTime"
catchTap="nextDetail" data-item="{{dynamicI
tem}}">
<view class="dynamicTime"
data-groupId="{{item.meetingId}}" catchTap="nextDetail" data-item="{{i
tem}}">
<text>{{dynamicItem.creator && dynamicItem.creator.name}}</text>
<text>{{dynamicItem.actionLog}}</text>
<text>{{dynamicItem.createTime}}</text>
...
...
pages/index/index.js
View file @
a3b06815
import
{
RRule
}
from
"rrule"
;
import
{
getDynamicList
,
meetingCollection
,
updateMeetingTask
,
getHomeUserSchedule1
}
from
"../../api/request"
;
...
...
@@ -20,13 +19,14 @@ import {
getCreateShowTime
}
from
"../../utils/utils"
;
import
{
checkFullScren
}
from
"../../utils/checkFullScren"
;
import
create
from
"dd-store"
;
import
pageStore
from
'../meetingDetail/store'
;
const
currentDate
=
new
Date
();
const
minYear
=
2020
;
const
minYear
=
currentDate
.
getFullYear
()
;
const
maxYear
=
currentDate
.
getFullYear
()
+
1
;
let
DateMap
=
getDateMap
(
minYear
,
maxYear
);
const
weekList
=
[
"周日"
,
"周一"
,
"周二"
,
"周三"
,
"周四"
,
"周五"
,
"周六"
];
import
create
from
"dd-store"
;
let
maxClickCount
=
5
;
create
.
Page
({
...
...
@@ -51,7 +51,6 @@ create.Page({
pages
:
1
,
listLoading
:
true
,
isIPX
:
checkFullScren
(),
scheduleListIndex
:
''
},
scrollTop
:
0
,
pageSize
:
10
,
...
...
@@ -125,6 +124,45 @@ create.Page({
await
this
.
addOnceMeeting
(
content
)
}
this
.
update
();
this
.
connect_start
();
// 注意: 回调方法的注册在整个小程序启动阶段只要做一次,调多次会有多次回调
dd
.
onSocketOpen
((
res
)
=>
{
dd
.
alert
({
content
:
'连接已打开!'
});
setInterval
(()
=>
{
dd
.
sendSocketMessage
({
data
:
'heartbeat'
,
// 需要发送的内容
success
:
(
res
)
=>
{
dd
.
alert
({
content
:
'数据发送!'
+
'heartbeat'
});
},
});
},
1000
)
});
dd
.
onSocketError
(
function
(
res
)
{
dd
.
alert
(
'WebSocket 连接打开失败,请检查!'
+
res
);
});
// 注意: 回调方法的注册在整个小程序启动阶段只要做一次,调多次会有多次回调
dd
.
onSocketMessage
((
res
)
=>
{
dd
.
alert
({
content
:
'收到数据!'
+
JSON
.
stringify
(
res
)
});
});
},
connect_start
()
{
dd
.
connectSocket
({
url
:
`ws://139.196.213.18:9999/meet-websocket/websocket/
${
getApp
().
globalData
.
userid
}
`
,
// 开发者服务器接口地址,必须是 wss 协议,且域名必须是后台配置的合法域名
success
:
(
res
)
=>
{
},
fail
:
()
=>
{
dd
.
showToast
({
content
:
'fail'
,
// 文字内容
});
}
});
},
//添加单次会议
async
addOnceMeeting
(
content
)
{
...
...
@@ -221,26 +259,14 @@ create.Page({
});
},
onHide
()
{
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
//
clearInterval(this.timer);
//
this.timer = null;
},
refresh
()
{
this
.
isNeverShowSchedulePage
=
true
;
this
.
isLoaded
=
false
;
this
.
onLoad
();
},
//动态列表侧滑的时候禁止页面上下滑动
setBodyDisableScroll
(
isStopBodyScroll
)
{
this
.
setData
({
isStopBodyScroll
});
},
//点击页面关闭侧滑模块
closeSwipe
()
{
if
(
this
.
$store
.
closeActiveSwipe
)
{
this
.
$store
.
closeActiveSwipe
();
}
},
getPages
(
current
,
callBack
)
{
getDynamicList
()
.
then
(
res
=>
{
...
...
@@ -276,47 +302,6 @@ create.Page({
}
});
},
//动态置顶
changeCollection
(
e
)
{
const
{
index
,
scheduleId
,
collection
}
=
e
.
target
.
dataset
;
meetingCollection
({
scheduleId
,
collection
}).
then
(
res
=>
{
//取消置顶
if
(
collection
===
"N"
)
{
// 重新获取第一页的数据
this
.
getPages
(
1
,
()
=>
{
dd
.
showToast
({
content
:
"取消成功"
});
});
}
else
{
//置顶
const
dynamicList
=
this
.
data
.
dynamicList
;
const
replaceItem
=
dynamicList
[
index
];
dynamicList
[
index
].
traceTime
=
res
.
data
.
data
;
dynamicList
.
splice
(
index
,
1
);
dynamicList
.
unshift
(
replaceItem
);
this
.
setData
(
{
dynamicList
:
dynamicList
},
()
=>
{
dd
.
showToast
({
content
:
"置顶成功"
});
}
);
}
});
},
//动态上拉加载分页数据
// onScrollToLower() {
// if (this.data.current < this.data.pages) {
// this.getPages(this.data.current + 1);
// }
// },
//动态修改状态
onChangeTaskStatusOnList
(
e
)
{
const
data
=
{
...
...
@@ -765,8 +750,8 @@ create.Page({
dd
.
navigateTo
({
url
:
"./../createMeeting/createMeeting"
});
},
nextDetail
:
throttle
(
function
(
e
)
{
const
{
item
}
=
e
.
target
.
dataset
;
const
scheduleItem
=
{
scheduleId
:
item
.
meetingId
||
item
.
id
,
scheduleTemplateId
:
item
.
scheduleTemplateId
,
planDate
:
item
.
planDate
}
const
{
item
,
groupId
}
=
e
.
target
.
dataset
;
const
scheduleItem
=
{
groupId
,
scheduleId
:
item
.
meetingId
||
item
.
id
,
scheduleTemplateId
:
item
.
scheduleTemplateId
,
planDate
:
item
.
planDate
}
dd
.
navigateTo
({
url
:
`./../meetingDetail/meetingDetail?scheduleItem=
${
encodeURIComponent
(
JSON
.
stringify
(
scheduleItem
))}
`
});
...
...
@@ -832,9 +817,11 @@ create.Page({
//切换到动态页面时,日程重置成当前日期
if
(
tabbar
==
"0"
)
{
this
.
lastOffset
=
this
.
data
.
offset
;
this
.
setData
({
offset
:
"stop"
});
setTimeout
(()
=>
{
this
.
setData
({
offset
:
"stop"
});
},
500
)
}
else
if
(
!
this
.
isNeverShowSchedulePage
)
{
this
.
setData
({
offset
:
this
.
lastOffset
...
...
pages/meetingDetail/meetingDetail.js
View file @
a3b06815
...
...
@@ -180,6 +180,12 @@ create.Page({
scheduleTemplateId
:
this
.
data
.
scheduleItem
.
scheduleTemplateId
,
planDate
:
!!
this
.
data
.
scheduleItem
.
planDate
?
this
.
data
.
scheduleItem
.
planDate
.
replace
(
/
\/
/g
,
'-'
)
:
null
}
//动态列表进来的详情传groupId
if
(
this
.
data
.
scheduleItem
.
groupId
)
{
data
.
groupId
=
this
.
data
.
scheduleItem
.
groupId
;
delete
data
.
id
;
delete
data
.
planDate
;
}
getScheduleDetail
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
!==
0
)
{
return
...
...
@@ -1961,7 +1967,7 @@ create.Page({
meetingId
:
this
.
store
.
data
.
scheduleId
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
this
.
closePopup
();
this
.
closePopup
1
();
// clear
this
.
store
.
data
.
notes
=
null
;
this
.
update
();
...
...
@@ -1980,7 +1986,7 @@ create.Page({
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
this
.
getAffairList
(
this
.
store
.
data
.
scheduleId
);
this
.
closePopup
();
this
.
closePopup
1
();
}
})
},
...
...
@@ -2011,7 +2017,7 @@ create.Page({
// clear
this
.
store
.
data
.
parentCommentId
=
''
;
this
.
update
();
this
.
closePopup
();
this
.
closePopup
1
();
}
})
},
...
...
@@ -2064,7 +2070,7 @@ create.Page({
notice
:
true
,
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
this
.
closePopup
();
this
.
closePopup
1
();
const
[
index
]
=
this
.
getIndexFromAffairList
(
commentId
);
if
(
index
!==
-
1
)
{
this
.
store
.
data
.
affairList
[
index
].
remark
=
remark
;
...
...
pages/tasks/tasks.js
View file @
a3b06815
...
...
@@ -11,4 +11,7 @@ create.Page({
meetingId
:
query
.
meetingId
})
},
changeTaskStatus
({
status
,
taskId
,
commentId
,
meetingId
})
{
}
});
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