Commit 61f236b0 by fengzhaoyu

conflict:解决冲突

parents 36ea5814 a681ea16
...@@ -237,3 +237,19 @@ export function getZoomUrl(data) { ...@@ -237,3 +237,19 @@ export function getZoomUrl(data) {
type: "binding" type: "binding"
}); });
} }
// oss 上传 获取授权
export function getOssPermission() {
return $http({
method: "get",
data: "",
url: `/meet/meeting-log-resource/getOssUploadSignature`
});
}
// oss 上传 获取授权
export function getuploadResource(data) {
return $http({
method: "post",
data: JSON.stringify(data),
url: `/meet/meeting-log-resource/uploadResource`
});
}
\ No newline at end of file
...@@ -20,4 +20,8 @@ view { ...@@ -20,4 +20,8 @@ view {
text-align: center; text-align: center;
color: #fff; color: #fff;
background: rgba(234, 12, 40, 1); background: rgba(234, 12, 40, 1);
}
.gray {
background: rgba(10, 10, 10, 0.2)!important;
} }
\ No newline at end of file
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
} }
.pptx, .ppt, .key { .pptx, .ppt, .key {
background: url(../../assests/ppt.png) center /100% 100% !important; background: url(../../assests/mp4.png) center /100% 100% !important;
} }
.xlsx, .numbers { .xlsx, .numbers {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="file-title"> <view class="file-title">
<text>{{item.fileName.slice(0, item.fileName.length - 5)}}</text> <text>{{item.fileName.slice(0, item.fileName.length - 5)}}</text>
<text>{{item.fileName.slice(-5)}}</text></view> <text>{{item.fileName.slice(-5)}}</text></view>
<view class="file-size">{{(item.fileSize/1024/1024).toFixed(2)}}KB</view> <view class="file-size">{{(item.fileSize/1024/1024).toFixed(2)}}M</view>
<view a:if="{{isCanDelete}}" class="iconfont iconicon_noAgreed1" catchTap="removeFile" data-id="{{item.fileId}}"></view> <view a:if="{{isCanDelete}}" class="iconfont iconicon_noAgreed1" catchTap="removeFile" data-id="{{item.fileId}}"></view>
</view> </view>
</view> </view>
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
} }
.applicationLogo { .applicationLogo {
flex: 0 0 72rpx;
width: 72rpx; width: 72rpx;
height: 72rpx; height: 72rpx;
margin-right: 24rpx; margin-right: 24rpx;
...@@ -65,6 +66,10 @@ ...@@ -65,6 +66,10 @@
} }
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(1) { .applicationMsg>view:nth-of-type(1)>view:nth-of-type(1) {
max-width: 448rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 28rpx; font-size: 28rpx;
color: #191F25; color: #191F25;
margin-bottom: 8rpx; margin-bottom: 8rpx;
......
...@@ -106,8 +106,8 @@ ...@@ -106,8 +106,8 @@
</view> </view>
</view> </view>
<!-- 保存 --> <!-- 保存 -->
<view class="save" onTap="addSchedule"> <view class="save" onTap="addSchedule1">
<view class="button"> <view class="button {{limitClick ? 'gray' : ''}}">
立即创建 立即创建
</view> </view>
<view class="tabBarBottom" a:if="{{isIPX}}"> <view class="tabBarBottom" a:if="{{isIPX}}">
......
...@@ -46,7 +46,8 @@ create.Page({ ...@@ -46,7 +46,8 @@ create.Page({
isAcrossDay: false, isAcrossDay: false,
conflictPeople: [], conflictPeople: [],
placeholder: '', placeholder: '',
isIPX: false isIPX: false,
limitClick: false,
}, },
showPop(event) { showPop(event) {
...@@ -336,7 +337,15 @@ create.Page({ ...@@ -336,7 +337,15 @@ create.Page({
} }
}, },
addSchedule: throttle(async function () { addSchedule1: throttle(async function () {
if (this.data.limitClick) {
return
}
console.log('我重复点击还是走到这了')
this.setData({ limitClick: true });
dd.showLoading({
content: '正在创建...',
});
let data = { let data = {
title: this.data.title || `${getApp().globalData.name}创建的会议`, title: this.data.title || `${getApp().globalData.name}创建的会议`,
location: { location: {
...@@ -355,7 +364,10 @@ create.Page({ ...@@ -355,7 +364,10 @@ create.Page({
meetingRoomId: this.$store.data.roomId, meetingRoomId: this.$store.data.roomId,
meetingWayModel: this.data.meetingWayModel meetingWayModel: this.data.meetingWayModel
} }
const res = await addSchedule(data); const res = await addSchedule(data).catch(err => {
this.setData({ limitClick: false });
dd.hideLoading();
});
if (res.data.code === 0) { if (res.data.code === 0) {
this.$store.data.tabBarIndex = '1' this.$store.data.tabBarIndex = '1'
if (this.data.repeatable === 0) { if (this.data.repeatable === 0) {
...@@ -368,12 +380,13 @@ create.Page({ ...@@ -368,12 +380,13 @@ create.Page({
id: res.data.data.id id: res.data.data.id
}) })
} }
} else { } else {
if (this.$store.modifyErpeatMeeting) { if (this.$store.modifyErpeatMeeting) {
await this.$store.modifyErpeatMeeting() await this.$store.modifyErpeatMeeting()
} }
} }
this.setData({ limitClick: false });
dd.hideLoading();
dd.navigateBack() dd.navigateBack()
} }
......
...@@ -879,7 +879,7 @@ create.Page({ ...@@ -879,7 +879,7 @@ create.Page({
maxClickCount--; maxClickCount--;
if (maxClickCount == 0) { if (maxClickCount == 0) {
dd.alert({ dd.alert({
content: "0.0.17" content: "0.0.18"
}); });
maxClickCount = 5; maxClickCount = 5;
} }
......
...@@ -139,25 +139,8 @@ ...@@ -139,25 +139,8 @@
<view class="permission" a:if="{{currentPeople != organizer}}"> <view class="permission" a:if="{{currentPeople != organizer}}">
</view> </view>
</view> </view>
<view class="meetingWayShow" a:if="{{comListData.meetingWayModelId == 0}}"> <!--<view class="meetingWayShow" a:if="{{comListData.meetingWayModelId == 0}}"><view class="meetingWayShowTop"><view class=" icon iconfont iconicon_camera1"></view><view class="meetingWayText"><view onTap="setCopy" data-item="https://zoom.com.cn/j/93255954558?pwd=YmNZQkY1SGxtUFNPYjZlcUpJT0xtQT09" data-type="url">
<view class="meetingWayShowTop"> Zoom</view><view class="mettingWayText" onTap="setCopy" data-item="513410069"><text>ID:513410069</text><text class="icon iconfont iconicon_icon"></text></view><view class="mettingWayText passWord" onTap="setCopy" data-item="4ez3am"><text >密码:4ez3am</text><text class="icon iconfont iconicon_icon"></text></view></view></view></view> -->
<view class=" icon iconfont iconicon_camera1">
</view>
<view class="meetingWayText">
<view onTap="setCopy" data-item="https://zoom.com.cn/j/93255954558?pwd=YmNZQkY1SGxtUFNPYjZlcUpJT0xtQT09" data-type="url">
Zoom
</view>
<view class="mettingWayText" onTap="setCopy" data-item="513410069">
<text>ID:513410069</text>
<text class="icon iconfont iconicon_icon"></text>
</view>
<view class="mettingWayText passWord" onTap="setCopy" data-item="4ez3am">
<text >密码:4ez3am</text>
<text class="icon iconfont iconicon_icon"></text>
</view>
</view>
</view>
</view>
<!-- 删除该会议 --> <!-- 删除该会议 -->
<template is="deleteBtn" onhandleDelete="" data="{{title: '删除该会议' }}"/> <template is="deleteBtn" onhandleDelete="" data="{{title: '删除该会议' }}"/>
</view> </view>
...@@ -207,6 +190,12 @@ ...@@ -207,6 +190,12 @@
<view onTap="addMeetingFile"> <view onTap="addMeetingFile">
<text class="iconfont iconicon_data"></text>文件 <text class="iconfont iconicon_data"></text>文件
</view> </view>
<view onTap="addOssFile">
<text class="iconfont iconicon_data"></text>
<view>
oss
</view>
</view>
<text class="devider"></text> <text class="devider"></text>
<view onTap="onShareAppMessage"> <view onTap="onShareAppMessage">
<text class="iconfont iconicon_share1"></text> <text class="iconfont iconicon_share1"></text>
......
import create from 'dd-store'; import create from 'dd-store';
import { checkFullScren } from "../../utils/checkFullScren"; import { checkFullScren } from "../../utils/checkFullScren";
import pageStore from './store'; import pageStore from './store';
import { getMeetingRoomAffairs, createMeetingTask, deleteMeetingTask, updateMeetingTask, uploadPermissions } from '../../api/request'; import { saveFileInfo, getMeetingRoomAffairs, createMeetingTask, deleteMeetingTask, updateMeetingTask, uploadPermissions } from '../../api/request';
import { isParticipate, deleteSchedule, getScheduleDetail, getUserScheduleInTime, modifySchedule, getMeetingRoomRepeatAffairs } from '../../api/request.js' import { getOssPermission, getuploadResource, isParticipate, deleteSchedule, getScheduleDetail, getUserScheduleInTime, modifySchedule, getMeetingRoomRepeatAffairs } from '../../api/request.js'
import { throttle, getCreateShowTime } from './../../utils/utils.js' import { throttle, getCreateShowTime, getRndInteger } from './../../utils/utils.js'
import { observer } from '/utils/observer.js' import { observer } from '/utils/observer.js'
import { resolve } from 'path'; import { resolve } from 'path';
create.Page({ create.Page({
...@@ -129,7 +129,7 @@ create.Page({ ...@@ -129,7 +129,7 @@ create.Page({
if (this.$store.data.updateInfo.isUpate) { if (this.$store.data.updateInfo.isUpate) {
switch (this.$store.data.updateInfo.updateType) { switch (this.$store.data.updateInfo.updateType) {
case 'operate_user': case 'operate_user':
if (this.$store.data.participatorList !== this.$store.data.originUsers) { if (JSON.stringify(this.$store.data.participatorList) !== JSON.stringify(this.$store.data.originUsers)) {
if (this.data.repeatable === 1) { if (this.data.repeatable === 1) {
this.setData({ this.setData({
'conSelectPopupData.selectType': 'common', 'conSelectPopupData.selectType': 'common',
...@@ -216,10 +216,10 @@ create.Page({ ...@@ -216,10 +216,10 @@ create.Page({
let repeatListMap = new Map() let repeatListMap = new Map()
for (let value of res.data.data.userList) { for (let value of res.data.data.userList) {
if (value.participator) { if (value.participator) {
participatorList.push(value.participator) participatorList.push({ userId: value.participator.userId, username: value.participator.username, headUrl: value.participator.headUrl, platform: value.participator.platform })
participatorUserId.push(value.participator.userId) participatorUserId.push(value.participator.userId)
originUsersId.push(value.participator.userId) originUsersId.push(value.participator.userId)
originUsers.push(value.participator) originUsers.push({ userId: value.participator.userId, username: value.participator.username, headUrl: value.participator.headUrl, platform: value.participator.platform })
} }
} }
for (let item of this.data.comListData.repeatList) { for (let item of this.data.comListData.repeatList) {
...@@ -871,9 +871,17 @@ create.Page({ ...@@ -871,9 +871,17 @@ create.Page({
break break
case 'modify_location': case 'modify_location':
this.reSetLocation() this.reSetLocation()
this.$store.data.updateInfo = {
isUpate: false,
updateType: ''
}
break break
case 'operate_user': case 'operate_user':
this.reSetUsers() this.reSetUsers()
this.$store.data.updateInfo = {
isUpate: false,
updateType: ''
}
break break
case 'repeat': case 'repeat':
this.reSetRepeat() this.reSetRepeat()
...@@ -984,7 +992,7 @@ create.Page({ ...@@ -984,7 +992,7 @@ create.Page({
}) })
break break
case 'operate_user': case 'operate_user':
if (this.$store.data.originUsers != this.$store.data.participatorList) { if (JSON.stringify(this.$store.data.originUsers) != JSON.stringify(this.$store.data.participatorList)) {
let addUserList = this.arrayPoor(this.$store.data.originUsers, this.$store.data.participatorList).addUserList let addUserList = this.arrayPoor(this.$store.data.originUsers, this.$store.data.participatorList).addUserList
let deleteUserList = this.arrayPoor(this.$store.data.originUsers, this.$store.data.participatorList).deleteUserList let deleteUserList = this.arrayPoor(this.$store.data.originUsers, this.$store.data.participatorList).deleteUserList
let dataUser = { let dataUser = {
...@@ -1600,6 +1608,74 @@ create.Page({ ...@@ -1600,6 +1608,74 @@ create.Page({
} }
}) })
}, },
// 上传oss文件
async addOssFile() {
const timestamp = new Date().getTime()
const random = getRndInteger(1000, 10000)
const permisson = await getOssPermission()
const imgInfo = await this.getOssImg()
const key = await new Promise((resolve) => { resolve(permisson.data.data.dir + timestamp + random + '.' + imgInfo.files[0].fileType) })
const fileName = await new Promise((resolve) => { resolve(timestamp + random + '.' + imgInfo.files[0].fileType) })
await this.uploadOssFile(permisson, imgInfo, key)
await this.saveOssFileInfo(permisson, imgInfo, key, fileName)
},
// 获取oss上传图片 选择图片 上传图片到oss
getOssImg() {
return new Promise((resolve, rejects) => {
dd.chooseImage({
count: 1,
success: (res) => {
resolve(res)
},
});
})
},
// 获取的图片上传到oss
uploadOssFile(permisson, imgInfo, key) {
return new Promise(resolve => {
dd.uploadFile({
url: permisson.data.data.host,
fileType: 'image',
fileName: 'file',
filePath: imgInfo.filePaths[0],
formData: {
key: key,
policy: permisson.data.data.policy,
OSSAccessKeyId: permisson.data.data.accessId,
success_action_status: 200,
signature: permisson.data.data.signature
},
success: () => {
resolve()
}
})
})
},
// 上传oss文件
saveOssFileInfo(permisson, imgInfo, key, fileName) {
const data = {
resourceType: 'accessory',
creatorId: getApp().globalData.userid,
category: '2',
scheduleId: this.store.data.scheduleId,
groupId: this.store.data.groupId,
creatorInfo: getApp().globalData.userInfo,
description: '',
logType: 'schedule_accessory_add',
fileInfos: JSON.stringify({
fileId: key,
fileName: fileName,
fileType: imgInfo.files[0].fileType,
fileSize: imgInfo.files[0].size
})
}
saveFileInfo(data).then(result => {
dd.alert({
title: '上传成功',
content: JSON.stringify(result)
})
})
},
//隐藏文件操作浮窗 //隐藏文件操作浮窗
hideFileOperate() { hideFileOperate() {
this.store.data.logId = ''; this.store.data.logId = '';
......
...@@ -174,7 +174,7 @@ create.Page({ ...@@ -174,7 +174,7 @@ create.Page({
}, },
// 编辑时候的保存 // 编辑时候的保存
editSave() { editSave() {
if (this.$store.data.originUsers != this.store.data.contactPeople) { if (JSON.stringify(this.$store.data.originUsers) != JSON.stringify(this.store.data.contactPeople)) {
this.$store.data.updateInfo.isUpate = true this.$store.data.updateInfo.isUpate = true
this.$store.data.updateInfo.updateType = 'operate_user' this.$store.data.updateInfo.updateType = 'operate_user'
this.$store.data.participatorList = this.store.data.contactPeople this.$store.data.participatorList = this.store.data.contactPeople
......
...@@ -8,6 +8,5 @@ export function getFlatTree(treeData) { ...@@ -8,6 +8,5 @@ export function getFlatTree(treeData) {
flatTreeMap.set(value.id, value) flatTreeMap.set(value.id, value)
} }
} }
console.log(flatTreeMap)
return flatTreeMap return flatTreeMap
} }
\ No newline at end of file
...@@ -150,4 +150,14 @@ export function getCreateShowTime(createdTime) { ...@@ -150,4 +150,14 @@ export function getCreateShowTime(createdTime) {
export function padZero(val) { export function padZero(val) {
return ("00" + val).slice(-2); return ("00" + val).slice(-2);
}
/*
获取随机数
min = 0 区间范围 默认0
max = 100 区间范围 默认100
[min, max)
*/
export function getRndInteger(min = 0, max = 100) {
return Math.floor(Math.random() * (max - min)) + min;
} }
\ No newline at end of file
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