Commit efb0d958 by fengzhaoyu

钉盘 预览 地点自定义

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