Commit efb0d958 by fengzhaoyu

钉盘 预览 地点自定义

parents b7ae50a8 a57070e5
...@@ -185,10 +185,10 @@ export function uploadPermissions() { ...@@ -185,10 +185,10 @@ export function uploadPermissions() {
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=add&ddUserId=${getApp().globalData.userid}` url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=add&ddUserId=${getApp().globalData.userid}`
}) })
} }
// 文件上传 // 文件预览
export function previewPermissions() { export function previewPermissions() {
return $http({ return $http({
method: 'get', method: 'get',
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=add&ddUserId=${getApp().globalData.userid}` url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=download&ddUserId=${getApp().globalData.userid}`
}) })
} }
\ No newline at end of file
...@@ -87,4 +87,10 @@ page { ...@@ -87,4 +87,10 @@ page {
position: absolute; position: absolute;
bottom: 4rpx; bottom: 4rpx;
right: -2rpx; right: -2rpx;
}
.accept {
background: #15BC83
}
.cancel {
background: #E60012 ;
} }
\ No newline at end of file
<view> <view>
<view class="list"> <view class="list" a:for="{{allUserList}}">
<view class="headImg"> <view class="headImg">
<image mode="scaleToFill" src=""/> <image mode="scaleToFill" src="{{item.participator.headUrl}}" a:if="{{item.participator.headUrl.length}}"/>
<text class="tip"></text> <text a:else>{{item.participator.username.substring(0,1)}}</text>
<!-- <text >dddd</text> --> <text a:if="{{!!item.participator.confirmAttendance}}" class="tip {{item.participator.confirmAttendance==1?'accept':'cancel'}} " ></text>
</view> </view>
<view class="info"> <view class="info">
<text class="name">哈哈哈哈1</text> <text class="name">{{item.participator.username}}</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> </view>
</view> </view>
\ No newline at end of file
...@@ -4,10 +4,17 @@ create.Page({ ...@@ -4,10 +4,17 @@ create.Page({
store: exampleStore, store: exampleStore,
useAll: true, useAll: true,
data: { data: {
allUserList: [],
}, },
onLoad() { onLoad(event) {
let allUserList = JSON.parse(event.userList)
this.setData({
allUserList: allUserList
})
dd.setNavigationBar({ dd.setNavigationBar({
title: `参会人(${this.store.data.participatorList.length}人)` title: `参会人(${this.data.allUserList.length}人)`
}) })
console.log(this.data.allUserList)
}, },
}); });
...@@ -38,7 +38,7 @@ page { ...@@ -38,7 +38,7 @@ page {
} }
.dateTime>view { .dateTime>view {
font-size: 24rpx; font-size: 22rpx;
line-height: 24rpx; line-height: 24rpx;
color: #191F25; color: #191F25;
/* margin-bottom: 8rpx; */ /* margin-bottom: 8rpx; */
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<text>{{item.value.day}}</text> <text>{{item.value.day}}</text>
</view> </view>
<view class="dataSchedule"> <view class="dataSchedule">
<view a:for="{{item.value.value}}" a:for-item="item2" class="overdue" onTap="nextDetail"> <view a:for="{{item.value.value}}" a:for-item="item2" data-id="{{item2.id}}" class="overdue" onTap="nextDetail">
<view class="dataScheduleName"> <view class="dataScheduleName">
{{item2.title}} {{item2.title}}
</view> </view>
...@@ -38,126 +38,6 @@ ...@@ -38,126 +38,6 @@
</view> </view>
</block> </block>
</block> </block>
<!-- <view class="scheduleList">
<view class="month">
2019年12月
</view>
<view class="week">
<view class="manyWeeks">
第49周,12月1日 - 7日
</view>
</view>
<view class="week">
<view class="manyWeeks">
第49周,12月1日 - 7日
</view>
</view>
<view class="week">
<view class="manyWeeks">
第49周,12月1日 - 7日
</view>
</view>
<view class="week">
<view class="manyWeeks">
第49周,12月1日 - 7日
</view>
</view>
</view>
<view class="scheduleList">
<view class="month">
1月
</view>
<view class="week">
<view class="manyWeeks">
第1周,1月1日 - 7日
</view>
<view class="date">
<view class="dateTime">
<view>
周三
</view>
<text>00</text>
</view>
<view class="dataSchedule">
<view class="overdue" onTap="nextDetail">
<view class="dataScheduleName">
过期的会议
</view>
<view class="dataScheduleTime">
10:00-10:30
</view>
</view>
<view class="overdue">
<view class="dataScheduleName">
过期的会议
</view>
<view class="dataScheduleTime">
10:00-10:30
</view>
</view>
</view>
</view>
<view class="date">
<view class="dateTime">
<view>
周四
</view>
<text>01</text>
</view>
<view class="dataSchedule">
<view>
<view class="dataScheduleName">
正常的会议
</view>
<view class="dataScheduleTime">
10:00-10:30
</view>
</view>
<view>
<view class="dataScheduleName">
公司技术讨论会
</view>
<view class="dataScheduleTime">
10:00-10:30
</view>
</view>
</view>
</view>
</view>
<view class="week">
<view class="manyWeeks">
第2周,1月1日 - 14日
</view>
<view class="date">
<view class="dateTime">
<view>
周四
</view>
<text>14</text>
</view>
<view class="dataSchedule">
<view class="cancel">
<view class="dataScheduleName">
取消的会议
</view>
<view class="dataScheduleTime">
10:00-10:30
</view>
</view>
</view>
</view>
</view>
<view class="week">
<view class="manyWeeks">
第3周,12月1日 - 7日
</view>
</view>
<view class="week">
<view class="manyWeeks">
第4周,12月1日 - 7日
</view>
</view>
</view> -->
</view> </view>
<view class="createSchedule " onTap="nextPage"> <view class="createSchedule " onTap="nextPage">
+ +
......
...@@ -76,11 +76,11 @@ Page({ ...@@ -76,11 +76,11 @@ Page({
} }
} }
for(let y=0;y<this.data.AllScheduleList.length;y++) { for(let y=0;y<this.data.AllScheduleList.length;y++) {
let date1 = this.data.AllScheduleList[y].startTime.slice(0,10) let date1 = this.data.AllScheduleList[y].startTime.slice(0,10).replace(/-/g, '/')
let date2 = this.data.AllScheduleList[y].endTime.slice(0,10) let date2 = this.data.AllScheduleList[y].endTime.slice(0,10).replace(/-/g, '/')
let count = this.count(date1, date2) let count = this.count(date1, date2)
if(count == 0) { if(count == 0) {
DateMap.get(`${new Date(this.data.AllScheduleList[y].startTime).toLocaleDateString()}`).scheduleList.push(this.data.AllScheduleList[y]) DateMap.get(`${new Date(this.data.AllScheduleList[y].startTime.replace(/-/g, '/')).toLocaleDateString()}`).scheduleList.push(this.data.AllScheduleList[y])
} else { } else {
for(let j = 0;j<=count;j++) { for(let j = 0;j<=count;j++) {
let time = new Date(); let time = new Date();
...@@ -185,11 +185,10 @@ Page({ ...@@ -185,11 +185,10 @@ Page({
}, },
nextPage() { nextPage() {
dd.navigateTo({ url: './../createOrEditSchedule/createOrEditSchedule' }) dd.navigateTo({ url: './../createOrEditSchedule/createOrEditSchedule' })
}, },
nextDetail () { nextDetail (e) {
dd.navigateTo({ url: './../scheduleDetail/scheduleDetail' }) let id = e.target.dataset.id
dd.navigateTo({ url: `./../scheduleDetail/scheduleDetail?id=${id}` })
} }
}); });
...@@ -9,7 +9,6 @@ create.Page({ ...@@ -9,7 +9,6 @@ create.Page({
data: { data: {
}, },
onLoad(event) { onLoad(event) {
console.log(JSON.parse(event.time))
this.setData({ this.setData({
time1: event.time1, time1: event.time1,
time2: event.time1 time2: event.time1
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<view class="search"> <view class="search">
<view class="icon iconfont iconsousuo"> <view class="icon iconfont iconsousuo">
</view> </view>
<input placeholder="搜索地点" /> <input placeholder="搜索地点" onInput="inputPlace"/>
</view> </view>
<view class="availableList" a:if="{{true}}"> <view class="availableList" a:if="{{!place}}">
<view class="title"> <view class="title">
可用会议室 可用会议室
</view> </view>
...@@ -69,9 +69,9 @@ ...@@ -69,9 +69,9 @@
</view> </view>
</view> </view>
</view> </view>
<view class="customLocation" a:else> <view class="customLocation" data-locationName="{{place}}" onTap="selectPlace" a:else>
<view class="customName"> <view class="customName">
西城广场星巴克2F {{place}}
</view> </view>
<view class="tip"> <view class="tip">
自定义位置 自定义位置
......
...@@ -3,7 +3,9 @@ import exampleStore from '/stores/exampleStore' ...@@ -3,7 +3,9 @@ import exampleStore from '/stores/exampleStore'
create.Page({ create.Page({
store: exampleStore, store: exampleStore,
useAll: true, useAll: true,
data: {}, data: {
place: ''
},
onLoad() { onLoad() {
dd.setNavigationBar({ dd.setNavigationBar({
title: '会议地点' title: '会议地点'
...@@ -15,5 +17,10 @@ create.Page({ ...@@ -15,5 +17,10 @@ create.Page({
dd.navigateBack({ dd.navigateBack({
delta: 1 delta: 1
}) })
},
inputPlace(event) {
this.setData({
place: event.detail.value
})
} }
}); });
...@@ -60,6 +60,7 @@ page { ...@@ -60,6 +60,7 @@ page {
} }
.scroll .imageGroup { .scroll .imageGroup {
position: relative;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
text-align: center; text-align: center;
...@@ -111,6 +112,7 @@ page { ...@@ -111,6 +112,7 @@ page {
padding: 0 32rpx; padding: 0 32rpx;
display: flex; display: flex;
margin-top: 16rpx; margin-top: 16rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
} }
.upload { .upload {
...@@ -135,6 +137,7 @@ page { ...@@ -135,6 +137,7 @@ page {
font-size: 24rpx; font-size: 24rpx;
color: rgba(25, 31, 37, 0.56); color: rgba(25, 31, 37, 0.56);
} }
.bottom { .bottom {
width: 686rpx; width: 686rpx;
display: flex; display: flex;
...@@ -145,23 +148,45 @@ page { ...@@ -145,23 +148,45 @@ page {
height: 112rpx; height: 112rpx;
bottom: 0; bottom: 0;
justify-content: space-between; justify-content: space-between;
color: rgba(25,31,37,0.56); color: rgba(25, 31, 37, 0.56);
font-size: 28rpx; font-size: 28rpx;
} }
.bottom .iconfont { .bottom .iconfont {
font-size: 40rpx; font-size: 40rpx;
margin-right: 8rpx; margin-right: 8rpx;
} }
.buttonGroup text { .buttonGroup text {
vertical-align: top; vertical-align: top;
} }
.describe { .describe {
padding: 0 32rpx; padding: 0 32rpx;
display: flex; display: flex;
background: #fff; background: #fff;
margin-top: 16rpx; margin-top: 16rpx;
} }
.describe .text { .describe .text {
padding: 27rpx 0; padding: 27rpx 0;
line-height: 44rpx; line-height: 44rpx;
}
.participatorStaus {
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background: red;
position: absolute;
bottom: 2rpx;
right: -5rpx;
}
.accept {
background: #15BC83
}
.cancel {
background: #E60012;
} }
\ No newline at end of file
...@@ -35,11 +35,12 @@ ...@@ -35,11 +35,12 @@
<view class="participants"> <view class="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}}" onTap="nextPage">
<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> </text>
</text> </text>
</view> </view>
...@@ -76,12 +77,10 @@ ...@@ -76,12 +77,10 @@
<text class="icontianjia iconfont"></text> <text class="icontianjia iconfont"></text>
</view> </view>
</view> </view>
<!-- 动态展示 -->
<view class="tip"> <view class="tip">
李文 修改了会议 2月12日 12:10 李文 修改了会议 2月12日 12:10
</view> </view>
<view class="tip">
王新萌 创建了会议 2月11日 10:32
</view>
<view class="bottom"> <view class="bottom">
<view class="buttonGroup"> <view class="buttonGroup">
<text class="icondidianmiaoshu iconfont"></text> <text class="icondidianmiaoshu iconfont"></text>
......
import { getScheduleDetail, uploadPermissions } from '../../api/request.js' import { getScheduleDetail, uploadPermissions, previewPermissions } from '../../api/request.js'
Page({ Page({
data: { data: {
title: '', title: '',
...@@ -8,18 +8,20 @@ Page({ ...@@ -8,18 +8,20 @@ Page({
weeks: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], weeks: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
week: '', week: '',
userList: [], userList: [],
aheadTimes: [],
isAcrossDay: true, isAcrossDay: true,
describe: '', uploadSpaceId: '',
spaceId: '' previewSpaceId: ''
}, },
onLoad() { onLoad(event) {
dd.setNavigationBar({ dd.setNavigationBar({
title: '会议详情' title: '会议详情'
}) })
// let data = {
// id: 1197
// }
let data = { let data = {
id: '1172' id: event.id
} }
getScheduleDetail(data).then(res => { getScheduleDetail(data).then(res => {
this.setData({ this.setData({
...@@ -36,8 +38,14 @@ Page({ ...@@ -36,8 +38,14 @@ Page({
return uploadPermissions() return uploadPermissions()
}).then(res => { }).then(res => {
this.setData({ this.setData({
spaceId: res.data.data uploadSpaceId: res.data.data
}) })
return previewPermissions()
}).then(res => {
this.setData({
previewSpaceId: res.data.data
})
}) })
}, },
// 是否跨天 // 是否跨天
...@@ -67,14 +75,17 @@ Page({ ...@@ -67,14 +75,17 @@ Page({
day: day day: day
} }
}, },
// 上传文件
upload() { upload() {
const _that = this
dd.uploadAttachmentToDingTalk({ dd.uploadAttachmentToDingTalk({
image: { multiple: true, compress: false, max: 9, spaceId: this.data.spaceId }, image: { multiple: true, compress: false, max: 9, spaceId: this.data.uploadSpaceId },
space: { spaceId: this.data.spaceId, isCopy: 1, max: 9 }, space: { spaceId: this.data.uploadSpaceId, isCopy: 1, max: 9 },
file: { spaceId: 'this.data.spaceId', max: 1 }, file: { spaceId: this.data.uploadSpaceId, max: 1 },
types: ["photo", "camera", "space"],//PC端仅支持["photo","file","space"] types: ["photo", "camera", "space"],//PC端仅支持["photo","file","space"]
success: (res) => { success: (res) => {
console.log(JSON.stringify(res), 111111) console.log(JSON.stringify(res.data), 111111)
_that.preview(res.data[0].fileId, res.data[0].fileSize, res.data[0].fileType, res.data[0].fileName)
}, },
fail: (err) => { fail: (err) => {
dd.alert({ dd.alert({
...@@ -83,8 +94,18 @@ Page({ ...@@ -83,8 +94,18 @@ Page({
} }
}) })
}, },
preview() { nextPage() {
dd.navigateTo({ url: `./../attendingSituation/attendingSituation?userList=${JSON.stringify(this.data.userList)}` })
},
preview(fileId, fileSize, fileType, fileName) {
dd.previewFileInDingTalk({
corpId: dd.corpId,
spaceId: this.data.previewSpaceId,
fileId: fileId,
fileName: fileName,
fileSize: fileSize,
fileType: fileType,
})
} }
......
...@@ -4,6 +4,7 @@ class Store { ...@@ -4,6 +4,7 @@ class Store {
locationName: '', locationName: '',
conflictPeople: [], conflictPeople: [],
participatorUserId: [], // 参会人的userId participatorUserId: [], // 参会人的userId
userList: []
} }
} }
......
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