Commit 79ca60bc by fengzhaoyu

会议详情 动态

parent b7a3ec00
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</view> </view>
<view class="addPeople iconfont icontianjia" onTap="addParticipants"> <view class="addPeople iconfont icontianjia" onTap="addParticipants">
</view> </view>
<view class="rightPeople"> <view class="rightPeople" catchTap="nextPage" data-nextPage="participantsDetail">
<text>{{participatorList.length}}人</text> <text>{{participatorList.length}}人</text>
<text class="iconfont iconyoujinru"></text> <text class="iconfont iconyoujinru"></text>
</view> </view>
......
...@@ -78,6 +78,10 @@ create.Page({ ...@@ -78,6 +78,10 @@ create.Page({
this.getScheduleInfo() this.getScheduleInfo()
this.update() this.update()
} else { } else {
this.store.data.startTime = this.data.time1
this.store.data.endTime = this.data.time2
this.store.data.week1 = this.data.week1
this.store.data.week2 = this.data.week2
this.store.data.aheadTimes = [15] this.store.data.aheadTimes = [15]
this.update() this.update()
} }
...@@ -278,7 +282,7 @@ create.Page({ ...@@ -278,7 +282,7 @@ create.Page({
let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
return year + '-' + month + '-' + day return year + '-' + month + '-' + day
}, },
resetStore(){ resetStore() {
this.store.data = { this.store.data = {
participatorList: [], // 参会人列表 participatorList: [], // 参会人列表
locationName: '', locationName: '',
...@@ -286,9 +290,9 @@ create.Page({ ...@@ -286,9 +290,9 @@ create.Page({
participatorUserId: [], // 参会人的userId participatorUserId: [], // 参会人的userId
userList: [], userList: [],
// 重复 重复机制 // 重复 重复机制
repeatable:0, repeatable: 0,
recurrenceModel:{ recurrenceModel: {
model:"no_repeat", model: "no_repeat",
}, },
editList: [{ icon: 'icondingwei', text: '地点' }, { icon: 'iconhuiqiantixing', text: '提醒' }, { icon: 'iconchongfu', text: '重复' }, { icon: 'icondidianmiaoshu', text: '描述' }, { icon: 'iconshanchu', text: '删除' }], editList: [{ icon: 'icondingwei', text: '地点' }, { icon: 'iconhuiqiantixing', text: '提醒' }, { icon: 'iconchongfu', text: '重复' }, { icon: 'icondidianmiaoshu', text: '描述' }, { icon: 'iconshanchu', text: '删除' }],
remark: '', // 会议描述 remark: '', // 会议描述
...@@ -347,16 +351,15 @@ create.Page({ ...@@ -347,16 +351,15 @@ create.Page({
latitude: '10', latitude: '10',
locationName: this.store.data.locationName || '' locationName: this.store.data.locationName || ''
}, },
shcheduleType: 'common',
startTime: `${this.data.time1.replace(/\//g, "-")}`, startTime: `${this.data.time1.replace(/\//g, "-")}`,
endTime: `${this.data.time2.replace(/\//g, '-')}`, endTime: `${this.data.time2.replace(/\//g, '-')}`,
scheduleType: 'common', scheduleType: this.store.data.roomId ? 'meeting' : 'common',
noticeType: 'dd_notice', noticeType: 'dd_notice',
participatorList: this.store.data.participatorList, participatorList: this.store.data.participatorList,
repeatable: this.store.data.repeatable, repeatable: this.store.data.repeatable,
aheadTimes: this.store.data.aheadTimes, aheadTimes: this.store.data.aheadTimes,
recurrenceModel: this.store.data.recurrenceModel, recurrenceModel: this.store.data.recurrenceModel,
meetingRoomId: null meetingRoomId: this.store.data.roomId
} }
addSchedule(data).then(res => { addSchedule(data).then(res => {
dd.navigateBack({ dd.navigateBack({
......
...@@ -5,15 +5,18 @@ create.Page({ ...@@ -5,15 +5,18 @@ create.Page({
store: exampleStore, store: exampleStore,
useAll: true, useAll: true,
data: { data: {
id: '',
descript: '', descript: '',
fileInfos: '' fileInfos: '',
scheduleId: ''
}, },
onLoad(event) { onLoad(event) {
dd.setNavigationBar({ dd.setNavigationBar({
title: '编辑文件' title: '编辑文件'
}) })
this.setData({ this.setData({
fileInfos: JSON.parse(event.file), id:JSON.parse(event.file).id,
fileInfos: JSON.parse(event.file).fileInfos,
descript: JSON.parse(event.file).descript descript: JSON.parse(event.file).descript
}) })
}, },
...@@ -27,7 +30,7 @@ create.Page({ ...@@ -27,7 +30,7 @@ create.Page({
// 点击保存 // 点击保存
save() { save() {
let data = { let data = {
id: this.data.fileInfos.id, id: this.data.id,
uploader: getApp().globalData.userid, uploader: getApp().globalData.userid,
uploaderInfo: JSON.stringify({ uploaderInfo: JSON.stringify({
userId: getApp().globalData.userid, userId: getApp().globalData.userid,
......
<!-- <mw-select></mw-select> --> <!-- <mw-select></mw-select> -->
版本号:94 版本号:98
<scroll-view a:if="{{todayStr !== ''}}" scroll-y="{{true}}" upper-threshold="50" lower-threshold="50" onScrollToLower="lower" style="height: 100vh;" scroll-into-view="{{todayStr}}"> <scroll-view a:if="{{todayStr !== ''}}" scroll-y="{{true}}" upper-threshold="50" lower-threshold="50" onScrollToLower="lower" style="height: 100vh;" scroll-into-view="{{todayStr}}">
<block a:for="{{scheduleList}}" a:for-item="scheduleYearList"> <block a:for="{{scheduleList}}" a:for-item="scheduleYearList">
<block a:for="{{scheduleYearList}}"> <block a:for="{{scheduleYearList}}">
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
可用会议室 可用会议室
</view> </view>
<block a:for="{{availableMeetingRoom}}"> <block a:for="{{availableMeetingRoom}}">
{{item.meetingRoomId}}
<view class="mettingRoom" data-locationName="{{item.name}}" data-locationid="{{item.meetingRoomId}}" onTap="selectMeetingRoom"> <view class="mettingRoom" data-locationName="{{item.name}}" data-locationid="{{item.meetingRoomId}}" onTap="selectMeetingRoom">
<view class="icon iconfont iconhuiyishi"> <view class="icon iconfont iconhuiyishi">
</view> </view>
...@@ -36,7 +37,6 @@ ...@@ -36,7 +37,6 @@
<view class="tip"> <view class="tip">
自定义位置 自定义位置
</view> </view>
</view> </view>
<view class="allMettingRoom" a:if="{{true}}" onTap="toRoomList"> <view class="allMettingRoom" a:if="{{true}}" onTap="toRoomList">
查看所有会议室 查看所有会议室
......
...@@ -19,7 +19,6 @@ page { ...@@ -19,7 +19,6 @@ page {
} }
.title, .place, .time, .remind { .title, .place, .time, .remind {
height: 112rpx;
display: flex; display: flex;
background: white; background: white;
} }
...@@ -36,12 +35,13 @@ page { ...@@ -36,12 +35,13 @@ page {
.title .text, .place .text, .time .text, .remind .text { .title .text, .place .text, .time .text, .remind .text {
line-height: 112rpx; line-height: 112rpx;
width: 100%; width: 100%;
height: 112rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12); border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
} }
.time .text { .scheduleInfo .time .text {
border: none; border: none;
line-height: 48rpx;
padding: 32rpx 0;
} }
.participants { .participants {
...@@ -91,7 +91,6 @@ page { ...@@ -91,7 +91,6 @@ page {
.right { .right {
position: absolute; position: absolute;
right: 32rpx; right: 32rpx;
;
opacity: 0.56; opacity: 0.56;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 28rpx; font-size: 28rpx;
...@@ -141,8 +140,8 @@ page { ...@@ -141,8 +140,8 @@ page {
.dynamicDetail { .dynamicDetail {
background: #fff; background: #fff;
overflow: hidden; margin-top: 32rpx;
padding: 48rpx 32rpx; position: relative;
} }
.latestTip { .latestTip {
...@@ -154,6 +153,7 @@ page { ...@@ -154,6 +153,7 @@ page {
.dynamicList { .dynamicList {
display: flex; display: flex;
margin-top: 32rpx; margin-top: 32rpx;
padding: 0 32rpx;
} }
.dynamicleft { .dynamicleft {
...@@ -222,11 +222,12 @@ page { ...@@ -222,11 +222,12 @@ page {
} }
.otherTip { .otherTip {
width: 100%;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
color: rgba(25, 31, 37, 0.40); color: rgba(25, 31, 37, 0.40);
line-height: 37rpx; line-height: 37rpx;
margin-top: 32rpx; margin-top: 10rpx;
} }
.bottom { .bottom {
...@@ -238,7 +239,7 @@ page { ...@@ -238,7 +239,7 @@ page {
background: white; background: white;
height: 112rpx; height: 112rpx;
bottom: 0; bottom: 0;
justify-content: space-between; justify-content: space-around;
color: rgba(25, 31, 37, 0.56); color: rgba(25, 31, 37, 0.56);
font-size: 28rpx; font-size: 28rpx;
} }
...@@ -304,7 +305,6 @@ page { ...@@ -304,7 +305,6 @@ page {
width: 20rpx; width: 20rpx;
height: 20rpx; height: 20rpx;
border-radius: 50%; border-radius: 50%;
background: red;
position: absolute; position: absolute;
bottom: 2rpx; bottom: 2rpx;
right: -5rpx; right: -5rpx;
...@@ -331,6 +331,7 @@ page { ...@@ -331,6 +331,7 @@ page {
.pdf { .pdf {
background: url(../../assests/pdf.png) center /100% 100%; background: url(../../assests/pdf.png) center /100% 100%;
} }
.image { .image {
background: url(../../assests/image.png) center /100% 100%; background: url(../../assests/image.png) center /100% 100%;
} }
...@@ -342,6 +343,7 @@ page { ...@@ -342,6 +343,7 @@ page {
.mov { .mov {
background: url(../../assests/mp4.png) center /100% 100%; background: url(../../assests/mp4.png) center /100% 100%;
} }
.mp4 { .mp4 {
background: url(../../assests/mp4.png) center /100% 100%; background: url(../../assests/mp4.png) center /100% 100%;
} }
...@@ -349,6 +351,7 @@ page { ...@@ -349,6 +351,7 @@ page {
.ppt { .ppt {
background: url(../../assests/ppt.png) center /100% 100%; background: url(../../assests/ppt.png) center /100% 100%;
} }
.pptx { .pptx {
background: url(../../assests/ppt.png) center /100% 100%; background: url(../../assests/ppt.png) center /100% 100%;
} }
...@@ -363,4 +366,26 @@ page { ...@@ -363,4 +366,26 @@ page {
.zip { .zip {
background: url(../../assests/zip.png) center /100% 100%; background: url(../../assests/zip.png) center /100% 100%;
}
.scheduleInfo .text .repeatTip {
font-size: 24rpx;
color: rgba(25, 31, 37, 0.51)
}
.dynamicContent {
width: 750rpx;
background: #fff;
display: inline-block;
}
.dynamicright {
position: relative;
}
.selectDynamicright {
position: absolute;
top: 0;
height: 100%;
width: 100%;
background: rgba(25, 31, 37, 0.12)
} }
\ No newline at end of file
<view class="scheduleDetail"> <view class="scheduleDetail">
{{startTime}}
<view class="scheduleInfo"> <view class="scheduleInfo">
<!-- 标题 --> <!-- 标题 -->
<view class="title"> <view class="title">
...@@ -27,35 +26,37 @@ ...@@ -27,35 +26,37 @@
${time1.substring(5, 7)}月${time1.substring(8, 10)}日 ${time1.substring(11, 16)} 至 ${time1.substring(5, 7)}月${time1.substring(8, 10)}日 ${time1.substring(11, 16)} 至
${time2.substring(5, 7)}月${time2.substring(8, 10)}日 ${time2.substring(11, 16)} ${time2.substring(5, 7)}月${time2.substring(8, 10)}日 ${time2.substring(11, 16)}
`}} `}}
<view class="repeatTip" a:if="{{!!isRepeatable}}">
每周三重复,截止到2020年3月29
</view>
</view> </view>
</view> </view>
<view class="text" a:else> <view class="text" a:else>
{{`${time1.substring(5, 7)}月${time1.substring(8, 10)}日 ${week} ${time1.substring(11, 16)}-${time2.substring(11, 16)}`}} <text>
{{`${time1.substring(5, 7)}月${time1.substring(8, 10)}日 ${week} ${time1.substring(11, 16)}-${time2.substring(11, 16)}`}}
</text>
<view class="repeatTip" a:if="{{!!isRepeatable}}">
{{recModel.model=='day_in_week'?(recModel.weekDayList.length==5?'每周的工作日重复':'每'+week+'重复'):'每天重复'}},
{{recModel.forever=='0'? '永不截止':'截止到'+recModel.terminateTime}}
</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 参会人 --> <!-- 参会人 -->
<view class="participants" onTap="nextPage" data-nextPage="participants"> <view class="participants" onTap="nextPage" data-nextPage="participants">
<view class="icon iconcanhuiren1 iconfont"> <view class="icon iconcanhuiren1 iconfont"></view>
</view>
<view class="scroll" v-if="{{!!userList.length}}"> <view class="scroll" v-if="{{!!userList.length}}">
<text class="imageGroup" a:for="{{userList}}" a:for-item="item"> <text class="imageGroup" a:for="{{userList}}" a:for-item="item">
<text> <text>
<image a:if="{{!!item.participator.headUrl}}" mode="scaleToFill" src="{{item.participator.headUrl}}"/> <image a:if="{{!!item.participator.headUrl}}" mode="scaleToFill" src="{{item.participator.headUrl}}"/>
<text a:else class="name">{{item.participator.username.substring(item.participator.username.length - 2, item.participator.username.length)}}</text> <text a:else class="name">{{item.participator.username.substring(item.participator.username.length - 2, item.participator.username.length)}}</text>
<text a:if="{{!!item.participator.confirmAttendance}}" class="participatorStaus {{item.participator.confirmAttendance==1?'accept':'cancel'}} "></text> <text a:if="{{!!item.participator.confirmAttendance}}" class="participatorStaus {{item.participator.confirmAttendance==1?'accept':'cancel'}} "></text></text></text></view>
</text>
</text>
</view>
<view class="right"> <view class="right">
<text class="number">{{userList.length}}人参与</text> <text class="number">{{userList.length}}人参与</text>
<text class="iconyoujinru iconfont"></text> <text class="iconyoujinru iconfont"></text></view></view>
</view>
</view>
<!-- 重复 --> <!-- 重复 -->
<view class="remind" a:if="{{aheadTimes.length}}"> <view class="remind" a:if="{{aheadTimes.length}}">
<view class="icon iconshijian iconfont"> <view class="icon iconshijian iconfont"></view>
</view>
<view class="text blank"> <view class="text blank">
<text a:if="{{aheadTimes.includes(0)}}">立即提醒</text> <text a:if="{{aheadTimes.includes(0)}}">立即提醒</text>
<text a:if="{{aheadTimes.includes(5)}}">5分钟前</text> <text a:if="{{aheadTimes.includes(5)}}">5分钟前</text>
...@@ -66,73 +67,59 @@ ...@@ -66,73 +67,59 @@
<text a:if="{{aheadTimes.includes(2880)}}">两天前</text> <text a:if="{{aheadTimes.includes(2880)}}">两天前</text>
<text a:if="{{aheadTimes.includes(10080)}}">1周前</text> <text a:if="{{aheadTimes.includes(10080)}}">1周前</text>
提醒 提醒
</view> </view></view>
</view>
<!-- 会议描述 --> <!-- 会议描述 -->
<view class="describe" a:if="{{!!remark}}"> <view class="describe" a:if="{{!!remark}}">
<view class="icon iconhuiyimiaoshu iconfont"> <view class="icon iconhuiyimiaoshu iconfont"></view>
</view>
<view class="text"> <view class="text">
{{remark}} {{remark}}
</view> </view></view>
</view>
<!-- 会议动态 --> <!-- 会议动态 -->
<view class="dynamic"> <view class="dynamic">
<view class="icon iconhuiyimiaoshu iconfont"> <view class="icon iconhuiyimiaoshu iconfont"></view>
</view>
<view class="text"> <view class="text">
会议动态 会议动态
</view> </view>
<view class="upload" onTap="upload"> <view class="upload" onTap="upload">
<text>文件上传</text> <text>文件上传</text>
<text class="icontianjia iconfont"></text> <text class="icontianjia iconfont"></text></view></view>
</view>
</view>
<!-- 动态详情展示 --> <!-- 动态详情展示 -->
<view class="dynamicDetail"> <view class="dynamicContent">
<view class="latestTip"> <view class="dynamicDetail" a:for="{{allFileInfo}}" onTouchStart="touchStart" onTouchEnd="touchEnd" onLongTap="longPress" data-id="{{item.meetingLogId}}">
李文 修改了会议 2月12日 12:10 <view class="dynamicList" a:if="{{!!item.scheduleAccessory}}">
</view> <view class="dynamicleft">
<view class="dynamicList" a:for="{{allFileInfo}}"> <image a:if="{{!!item.scheduleAccessory.uploaderInfo.headUrl}}" mode="scaleToFill" src="{{item.scheduleAccessory.uploaderInfo.headUrl}}"/>
<view class="dynamicleft"> <text a:else>{{item.scheduleAccessory.uploaderInfo.username.substring(0,1)}}</text></view>
<image a:if="{{!!item.uploaderInfo.headUrl}}" mode="scaleToFill" src="{{item.uploaderInfo.headUrl}}"/> <view class="dynamicright">
<text a:else>{{item.uploaderInfo.username.substring(0,1)}}</text> <view class="dynamicMinutes">
</view> <text>{{item.scheduleAccessory.uploaderInfo.username}}</text>
<view class="dynamicright"> <text>{{item.scheduleAccessory.time}}</text></view>
<view class="dynamicMinutes"> <view class="describe">
<text>{{item.username}}</text> {{item.scheduleAccessory.descript}}
<text>{{item.time}}</text>
</view>
<view class="describe" a:if="{{!!item.descript}}">
{{item.descript}}
</view>
<view class="file" data-file="{{item2}}" onTap="preview" a:for="{{item.fileInfos}}" a:for-item="item2" onTouchStart="touchStart" onTouchEnd="touchEnd" onLongTap="longPress">
<view class="fileImage {{item2.fileType==('png' || 'jpg' || 'svg' || 'jpeg') ?'image': item2.fileType}}">
</view> </view>
<view class="fileName"> <view class="file" data-file="{{item2}}" onTap="preview" a:for="{{item.scheduleAccessory.fileInfos}}" a:for-item="item2">
{{item2.fileName}} <view class="fileImage {{item2.fileType==('png' || 'jpg' || 'svg' || 'jpeg') ?'image': item2.fileType}}"></view>
<view class="fileName">
{{item2.fileName}}
</view>
</view> </view>
<view class="modFile" a:if="{{organizer == pemissions?(item2.fileId == fileId):(item2.fileId == fileId&&item.uploaderInfo.userId==pemissions)}}"> <view class="modFile" a:if="{{organizer == pemissions?(item.meetingLogId == meetingLogId):(item.meetingLogId == meetingLogId&&item.scheduleAccessory.uploaderInfo.userId==pemissions)}}" >
<view class="ediFile" data-nextPage="editFile" catchTap="nextPage" data-file="{{item}}"> <view class="ediFile" data-nextPage="editFile" catchTap="nextPage" data-file="{{item.scheduleAccessory}}">
编辑 编辑
</view> </view>
<view class="delFile" catchTap="delFile" data-file="{{item}}"> <view class="delFile" catchTap="delFile" data-file="{{item.scheduleAccessory}}">
删除 删除
</view> </view>
<view class="triangle"> <view class="triangle"></view>
</view> </view>
<view class="selectDynamicright">
</view> </view>
</view> </view>
</view> </view>
</view> <view class="otherTip">
<view class="otherTip"> {{item.content}}
大鹏 将 海棠 添加到会议 17:03 {{item.time}}
</view> </view>
<view class="otherTip">
大鹏 修改了会议 今天 16:14
</view>
<view class="otherTip">
大鹏 修改了会议 今天 16:14
</view> </view>
</view> </view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
...@@ -141,11 +128,11 @@ ...@@ -141,11 +128,11 @@
<text class="icondidianmiaoshu iconfont"></text> <text class="icondidianmiaoshu iconfont"></text>
<text>编辑</text> <text>编辑</text>
</view> </view>
<view class="buttonGroup" data-nextPage="edit" onTap="nextPage"> <view class="buttonGroup" data-nextPage="edit" onTap="nextPage" a:if="{{!(organizer == pemissions)}}">
<text class="icondidianmiaoshu iconfont"></text> <text class="icondidianmiaoshu iconfont"></text>
<text>参加</text> <text>参加</text>
</view> </view>
<view class="buttonGroup" data-nextPage="edit" onTap="nextPage"> <view class="buttonGroup" data-nextPage="edit" onTap="nextPage" a:if="{{!(organizer == pemissions)}}">
<text class="icondidianmiaoshu iconfont"></text> <text class="icondidianmiaoshu iconfont"></text>
<text>不参加</text> <text>不参加</text>
</view> </view>
......
...@@ -19,9 +19,11 @@ create.Page({ ...@@ -19,9 +19,11 @@ create.Page({
allFileInfo: '', allFileInfo: '',
scheduleTemplateId: '', scheduleTemplateId: '',
getDynamicTip: [], getDynamicTip: [],
fileId: '', meetingLogId: '',
organizer: '', organizer: '',
pemissions: '' pemissions: '',
isRepeatable: '',
recModel: ''
}, },
onLoad(event) { onLoad(event) {
let scheduleItem = JSON.parse(event.scheduleItem) let scheduleItem = JSON.parse(event.scheduleItem)
...@@ -35,7 +37,7 @@ create.Page({ ...@@ -35,7 +37,7 @@ create.Page({
}, },
onShow() { onShow() {
this.setData({ this.setData({
fileId: '' meetingLogId: ''
}) })
let data = { let data = {
id: this.data.scheduleItem.id, id: this.data.scheduleItem.id,
...@@ -45,10 +47,12 @@ create.Page({ ...@@ -45,10 +47,12 @@ create.Page({
getScheduleDetail(data).then(res => { getScheduleDetail(data).then(res => {
this.setData({ this.setData({
title: res.data.data.title, title: res.data.data.title,
isRepeatable: res.data.data.repeatable,
location: res.data.data.location, location: res.data.data.location,
time1: res.data.data.startTime, time1: res.data.data.startTime,
time2: res.data.data.endTime, time2: res.data.data.endTime,
organizer: res.data.data.organizer, organizer: res.data.data.organizer,
recModel: res.data.data.recurrenceModel,
week: this.data.weeks[new Date(res.data.data.startTime).getDay() - 1] week: this.data.weeks[new Date(res.data.data.startTime).getDay() - 1]
}) })
this.store.data.userList = res.data.data.userList this.store.data.userList = res.data.data.userList
...@@ -129,7 +133,6 @@ create.Page({ ...@@ -129,7 +133,6 @@ create.Page({
_that.setData({ _that.setData({
previewSpaceId: res.data.data previewSpaceId: res.data.data
}) })
console.log(res.data.data)
dd.previewFileInDingTalk({ dd.previewFileInDingTalk({
corpId: dd.corpId, corpId: dd.corpId,
spaceId: _that.data.previewSpaceId, spaceId: _that.data.previewSpaceId,
...@@ -144,7 +147,7 @@ create.Page({ ...@@ -144,7 +147,7 @@ create.Page({
delFile(event) { delFile(event) {
const _that = this const _that = this
this.setData({ this.setData({
fileId: '' meetingLogId: ''
}) })
let data = event.target.dataset.file.id let data = event.target.dataset.file.id
dd.confirm({ dd.confirm({
...@@ -183,12 +186,13 @@ create.Page({ ...@@ -183,12 +186,13 @@ create.Page({
let allFileInfo = [] let allFileInfo = []
if (!!res.data.data) { if (!!res.data.data) {
res.data.data.forEach((item, index) => { res.data.data.forEach((item, index) => {
item.time = this.dealFileTime(item.createTime)
if (!!item.scheduleAccessory) { if (!!item.scheduleAccessory) {
item.scheduleAccessory.time = this.dealFileTime(item.createTime) item.scheduleAccessory.time = this.dealFileTime(item.createTime)
item.scheduleAccessory.fileInfos = JSON.parse(item.scheduleAccessory.fileInfos) item.scheduleAccessory.fileInfos = JSON.parse(item.scheduleAccessory.fileInfos)
item.scheduleAccessory.uploaderInfo = JSON.parse(item.scheduleAccessory.uploaderInfo) item.scheduleAccessory.uploaderInfo = JSON.parse(item.scheduleAccessory.uploaderInfo)
allFileInfo.push(item.scheduleAccessory)
} }
allFileInfo.push(item)
}) })
} }
this.setData({ this.setData({
...@@ -203,7 +207,7 @@ create.Page({ ...@@ -203,7 +207,7 @@ create.Page({
// 长按事件 // 长按事件
longPress(event) { longPress(event) {
this.setData({ this.setData({
fileId: event.target.dataset.file.fileId meetingLogId: event.target.dataset.id
}) })
}, },
// 跳转下一页 // 跳转下一页
...@@ -216,8 +220,9 @@ create.Page({ ...@@ -216,8 +220,9 @@ create.Page({
dd.navigateTo({ url: `./../createOrEditSchedule/createOrEditSchedule?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` }) dd.navigateTo({ url: `./../createOrEditSchedule/createOrEditSchedule?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` })
break; break;
case 'editFile': case 'editFile':
console.log(event.target.dataset.file)
this.setData({ this.setData({
fileId: '' meetingLogId: ''
}) })
dd.navigateTo({ url: `./../editFile/editFile?file=${JSON.stringify(event.target.dataset.file)}` }) dd.navigateTo({ url: `./../editFile/editFile?file=${JSON.stringify(event.target.dataset.file)}` })
break; break;
...@@ -225,12 +230,13 @@ create.Page({ ...@@ -225,12 +230,13 @@ create.Page({
}, },
// 判断是刚刚 五分钟以内 十分钟以内 正常时间年月日 // 判断是刚刚 五分钟以内 十分钟以内 正常时间年月日
dealFileTime(creatTime) { dealFileTime(creatTime) {
creatTime = creatTime.replace(/\-/g, "/")
let nowTime = new Date().getTime() let nowTime = new Date().getTime()
let time = new Date(creatTime).getTime() let time = new Date(creatTime).getTime()
let timeResule = '' let timeResule = ''
if ((nowTime - time) / 1000 < 60) { if ((nowTime - time) / 1000 < 60) {
timeResule = '刚刚' timeResule = '刚刚'
} else if((nowTime - time) / 1000 < 60*5 || (nowTime - time) / 1000==60 ){ } else if ((nowTime - time) / 1000 < 60 * 5 || (nowTime - time) / 1000 == 60) {
timeResule = '5分钟以内' timeResule = '5分钟以内'
} else { } else {
timeResule = creatTime.substring(0, 16) timeResule = creatTime.substring(0, 16)
......
...@@ -62,9 +62,7 @@ create.Page({ ...@@ -62,9 +62,7 @@ create.Page({
fail: (err) => { fail: (err) => {
} }
}) })
}) })
}, },
// 点击保存 // 点击保存
save() { save() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment