Commit 8cae1d78 by liang ce

合并冲突

parents bd071410 71b95ece
......@@ -186,7 +186,7 @@ export function uploadPermissions() {
})
}
// 文件预览
export function previewPermissions(fileIds) {
export function previewPermissions(fileIds) {
return $http({
method: 'get',
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=download&ddUserId=${getApp().globalData.userid}&fileIds=${fileIds}`
......@@ -196,7 +196,7 @@ export function previewPermissions(fileIds) {
export function modifySchedule(data) {
return $http({
method: 'post',
data: JSON.stringify(data),
data: JSON.stringify(data),
url: `/meet/schedule/modifySchedule`
})
}
......@@ -204,7 +204,7 @@ export function modifySchedule(data) {
export function deleteSchedule(data) {
return $http({
method: 'post',
data: JSON.stringify(data),
data: JSON.stringify(data),
url: `/meet/schedule/deleteSchedule`
})
}
......@@ -223,4 +223,35 @@ export function getAllScheduleWithMeetingRoomByTime(data) {
data: JSON.stringify(data),
url: `/meet/meeting-room/getAllScheduleWithMeetingRoomByTime`
})
}
// 获取动态展示
export function getDynamic(data) {
return $http({
method: 'post',
data: JSON.stringify(data),
url: `/meet/meeting-log/list`
})
}
// 获取动态展示
export function saveFileInfo(data) {
return $http({
method: 'post',
data: JSON.stringify(data),
url: `/meet/schedule-accessory/save`
})
}
// 删除文件
export function delFile(data) {
return $http({
method: 'get',
url: `/meet/schedule-accessory/remove/${data}`
})
}
// 编辑文件
export function editFile(data) {
return $http({
method: 'post',
data: JSON.stringify(data),
url: `/meet/schedule-accessory/update`
})
}
\ No newline at end of file
{
"pages": [
"pages/index/index",
"pages/createOrEditSchedule/createOrEditSchedule",
"pages/meetingRoomList/meetingRoomList",
"pages/uploadFile/uploadFile",
"pages/repetitionTime/repetitionTime",
"pages/repeatMechanism/repeatMechanism",
"pages/attendingSituation/attendingSituation",
......@@ -10,6 +9,8 @@
"pages/remind/remind",
"pages/scheduleDetail/scheduleDetail",
"pages/place/place",
"pages/participantsDetail/participantsDetail"
"pages/participantsDetail/participantsDetail",
"pages/editFile/editFile",
"pages/meetingRoomList/meetingRoomList"
]
}
......@@ -28,7 +28,7 @@ page {
text-align: center;
}
.headImg image {
vertical-align: middle;
vertical-align: top;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
......
......@@ -22,6 +22,7 @@ page {
color: #191F25;
padding: 30rpx 32rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
position: relative;
}
.theme input {
......@@ -81,7 +82,7 @@ page {
.startTime {
width: 355rpx;
text-indent: 32rpx;
position: relative;
/* position: relative; */
/* border-right: 1rpx solid rgba(25, 31, 37, 0.12); */
}
......@@ -273,16 +274,20 @@ page {
}
.editList {
padding: 24rpx 16rpx;
width: 670rpx;
padding: 0 16rpx;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.13);
background: #fff;
display: flex;
width: 670rpx;
border-radius: 6rpx;
margin: 24rpx 0 0 24rpx;
margin: 24rpx 24rpx 0 24rpx;
justify-content: space-around;
}
.editList>view {
margin: 24rpx 0;
}
.listIcon {
line-height: 30rpx;
text-align: center;
......@@ -322,6 +327,7 @@ page {
.repeatContaint {
width: 100%;
height: auto;
}
.repeat .iconshanchu {
......@@ -363,4 +369,18 @@ page {
.blank>text {
margin-right: 10rpx;
}
\ No newline at end of file
}
.container {
position: relative;
}
.permissions {
width: 100%;
background:rgba(0, 0, 0, 0);
position: absolute;
height: 100%;
top: 0;
z-index: 10;
}
.noPermissions {
opacity: 0.6;
}
......@@ -6,8 +6,8 @@ create.Page({
store: exampleStore,
useAll: true,
data: {
modifyModel: '',
deleteModel: '',
modifyModel: 'only',
deleteModel: 'only',
timeStaus: '',
isShowModal: false,
title: '',
......@@ -21,15 +21,18 @@ create.Page({
scheduleItem: '', // 日程ID 从详情页面传过来
buttonText: '立即创建',
// 人员增量信息 减量信息 只有在编辑的时候使用
addUserList: undefined,
deleteUserList: undefined,
addUserList: [],
deleteUserList: [],
originUserList: [],
requireUsers: [],
requireUsersInfo: [],
organizer: ''
organizer: '',
isRepeat: '',
permissions: ''
},
onLoad(event) {
let index = new Date().getDay()
let title = `${getApp().globalData.name}创建的会议`
this.data.repeatWeek = this.data.repeatWeek[index - 1]
this.store.data.remark = ''
this.store.data.recurrenceModel = {
......@@ -59,7 +62,9 @@ create.Page({
week1: w,
week2: w,
type: event.type,
repeatWeek: this.data.repeatWeek
permissions: getApp().globalData.userid,
repeatWeek: this.data.repeatWeek,
title: title
})
if (!!event.scheduleItem) {
let scheduleItem = JSON.parse(event.scheduleItem)
......@@ -76,10 +81,11 @@ create.Page({
this.store.data.aheadTimes = [15]
this.update()
}
this.conflict()
},
onShow() {
const _that = this
_that.conflict()
_that.arrayPoor(_that.data.originUserList, _that.store.data.participatorList)
setTimeout(function () {
_that.update()
}, 100)
......@@ -189,11 +195,11 @@ create.Page({
select = [...this.store.data.participatorUserId]
require = [...this.data.requireUsers]
}
select = _that.selectedelRequired(require, select).pickedUsers
dd.complexChoose({
limitTips: "超出了", //超过限定人数返回提示
title: "选择参会人", //标题
multiple: true, //是否多选
pickedUsers: _that.selectedelRequired(require, select).pickedUsers, //已选用户
pickedUsers: select, //已选用户
requiredUsers: require, //必选用户(不可取消选中状态)
responseUserOnly: true, //返回人,或者返回人和部门
success: function (res) {
......@@ -201,17 +207,16 @@ create.Page({
_that.store.data.participatorList = []
_that.store.data.participatorUserId = []
res.users.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.headUrl })
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.avatar })
_that.store.data.participatorUserId.push(item.userId)
})
_that.store.data.participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar })
_that.store.data.participatorUserId.push(getApp().globalData.userid)
} else {
_that.store.data.participatorList = []
_that.store.data.participatorUserId = []
res.users.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.headUrl })
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.avatar })
_that.store.data.participatorUserId.push(item.userId)
})
_that.data.requireUsersInfo.forEach((item, index) => {
......@@ -237,7 +242,7 @@ create.Page({
}
switch (event.target.dataset.nextPage) {
case 'participantsDetail':
dd.navigateTo({ url: `./../participantsDetail/participantsDetail?time=${JSON.stringify(time)}` })
dd.navigateTo({ url: `./../participantsDetail/participantsDetail?scheduleItem=${JSON.stringify(this.data.scheduleItem)}&organizer=${this.data.organizer}&requireUsers=${JSON.stringify(this.data.requireUsers)}&requireUsersInfo=${JSON.stringify(this.data.requireUsersInfo)}` })
break;
case 'place':
this.store.data.startTime = this.data.time1
......@@ -370,7 +375,7 @@ create.Page({
}
break;
case 'icondidianmiaoshu':
this.store.data.remark = null
this.store.data.remark = ''
break;
case 'iconhuiqiantixing':
this.store.data.aheadTimes = []
......@@ -392,11 +397,16 @@ create.Page({
}
getUserScheduleInTime(data).then(res => {
for (let value in res.data.data) {
if (!!res.data.data[value].length) {
if (res.data.data[value]) {
if (!!this.data.scheduleItem) {
if (res.data.data[value].length > 1) {
this.store.data.conflictPeople.push(value)
}
} else {
if (res.data.data[value].length > 0) {
this.store.data.conflictPeople.push(value)
}
}
}
this.update()
})
......@@ -424,10 +434,11 @@ create.Page({
this.store.data.remark = res.data.data.remark || ''
this.store.data.recurrenceModel = res.data.data.recurrenceModel || { model: 'no-repeat' }
this.setData({
isRepeat: res.data.data.repeatable,
organizer: res.data.data.organizer,
requireUsersInfo: participatorList,
requireUsers: participatorUserId,
originUserList: participatorList,
originUserList: [...participatorList],
title: res.data.data.title,
time1: res.data.data.startTime.replace(/-/g, '/'),
time2: res.data.data.endTime.replace(/-/g, '/'),
......@@ -457,9 +468,17 @@ create.Page({
dd.navigateTo({ url: './../place/place' })
break;
case 'iconshanchu':
let identify = 'major'
if (!!this.data.scheduleItem) {
if (this.data.organizer == this.data.permissions) {
identify = 'major'
} else {
identify = 'secondary'
}
}
let data = {
scheduleId: this.data.scheduleItem.id,
identify: 'major',
identify: identify,
deleteModel: 'only'
}
dd.confirm({
......@@ -468,11 +487,13 @@ create.Page({
confirmButtonText: '确定',
cancelButtonText: '取消',
success: (success) => {
deleteSchedule(data).then(res => {
dd.navigateBack({
delta: 2
if (!!success.confirm) {
deleteSchedule(data).then(res => {
dd.navigateBack({
delta: 2
})
})
})
}
}
})
break;
......@@ -512,16 +533,12 @@ create.Page({
// 保存重复日程
saveRepeat(event) {
let modifyModel = ''
switch (event.detail.value) {
case 0:
modifyModel = 'only'
break;
case 1:
modifyModel = 'future'
break;
case 2:
modifyModel = 'all'
break;
if (event.detail.value == 0) {
modifyModel = 'only'
} else if (event.detail.value == 1) {
modifyModel = 'future'
} else {
modifyModel = 'all'
}
this.setData({
modifyModel: modifyModel
......@@ -531,21 +548,28 @@ create.Page({
// 删除重复日程
deleteRepeatSchedule(event) {
let deleteModel = ''
switch (event.detail.value) {
case 0:
deleteModel = 'only'
break;
case 1:
deleteModel = 'future'
break;
case 2:
deleteModel = 'all'
break;
let identify = 'major'
if (!!this.data.scheduleItem) {
if (this.data.organizer == this.data.permissions) {
identify = 'major'
} else {
identify = 'secondary'
}
}
if (event.detail.value == 0) {
deleteModel = 'only';
} else if (event.detail.value == 1) {
deleteModel = 'future';
} else {
deleteModel = 'all';
}
this.setData({
deleteModel: deleteModel
})
let data = {
planDate: this.data.scheduleItem.planDate,
templateId: this.data.scheduleItem.scheduleTemplateId,
identify: 'major',
identify: identify,
deleteModel: deleteModel
}
deleteSchedule(data).then(res => {
......@@ -553,21 +577,20 @@ create.Page({
delta: 2
})
})
},
// 已选用户去中去掉必选用户
selectedelRequired(requiredUsers, pickedUsers) {
for (let i = 0; i < requiredUsers.length; i++) {
for (let m = 0; m < pickedUsers.length; m++) {
if (requiredUsers[i] == pickedUsers[m]) {
pickedUsers.splice(m, 1)
selectedelRequired(req, pic) {
for (let i = 0; i < req.length; i++) {
for (let m = 0; m < pic.length; m++) {
if (req[i] == pic[m]) {
pic.splice(m, 1)
m--;
}
}
}
return {
requiredUsers: requiredUsers,
pickedUsers: pickedUsers
requiredUsers: req,
pickedUsers: pic
}
}
});
@import "../../font/iconfont.acss";
page {
background: #fff;
font-family: PingFangSC-Regular;
font-size: 34rpx;
color: #191F25;
padding-bottom: 180rpx;
}
.fileList {
margin-top: 32rpx;
padding: 0 32rpx;
display: flex;
justify-content: space-between;
}
.file {
background: #F6F7F8;
border-radius: 2rpx;
width: 634rpx;
height: 88rpx;
line-height: 88rpx;
display: flex;
overflow: hidden;
}
.fileimage{
width: 60rpx;
height: 72rpx;
background: #3296Fa;
margin: 8rpx 16rpx 8rpx 8rpx;
}
.fileName {
font-size: 26rpx;
}
.close {
line-height: 88rpx;
font-size: 30rpx;
color: rgba(25, 31, 37, 0.40);
text-align: right;
}
.add {
padding: 0 32rpx;
margin-top: 40rpx;
}
.icontianjia {
line-height: 33rpx;
color: #3296fa;
margin-right: 16rpx;
}
.addText {
vertical-align: top;
font-size: 24rpx;
color: #3296FA;
}
.save {
padding: 32rpx 34rpx;
position: fixed;
bottom: 0;
}
.saveButton {
font-size: 36rpx;
width: 686rpx;
line-height: 96rpx;
text-align: center;
color: #fff;
background: #3296FA;
border: 1rpx solid rgba(25, 31, 37, 0.12);
border-radius: 48rpx;
}
\ No newline at end of file
<view class="uploadFile">
<view class="describe">
<textarea class="textarea" value="{{descript}}" onInput="inputDes" placeholder="添加文件描述..." maxlength="-1" />
</view>
<view class="save">
<view class="saveButton" onTap="save">
保存
</view>
</view>
</view>
\ No newline at end of file
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
import { editFile } from '../../api/request.js'
create.Page({
store: exampleStore,
useAll: true,
data: {
descript: '',
fileInfos: ''
},
onLoad(event) {
dd.setNavigationBar({
title: '编辑文件'
})
this.setData({
fileInfos: JSON.parse(event.file),
descript: JSON.parse(event.file).descript
})
},
inputDes(event) {
let value = event.detail.value
this.setData({
descript: value
})
},
// 点击保存
save() {
let data = {
id: this.data.fileInfos.id,
uploader: getApp().globalData.userid,
uploaderInfo: JSON.stringify({
userId: getApp().globalData.userid,
username: getApp().globalData.name,
headUrl: getApp().globalData.avatar
}),
thirdStoreTenant: 'dingTalk',
fileInfos: JSON.stringify(this.data.fileInfos.fileInfos),
descript: this.data.descript
}
editFile(data).then(res => {
dd.navigateBack({
delta: 1
})
})
}
});
{}
\ No newline at end of file
<!-- <mw-select></mw-select> -->
版本号:90版
<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="{{scheduleYearList}}">
......
......@@ -22,13 +22,22 @@ page {
height: 64rpx;
background: #3296FA;
border-radius: 50%;
overflow: hidden;
color: white;
line-height: 64rpx;
text-align: center;
position: relative;
}
.conflict {
position: absolute;
width: 18rpx;
height: 18rpx;
background: red;
bottom: 3rpx;
right: -2rpx;
border-radius: 50%;
}
.headImg image {
vertical-align: middle;
vertical-align: top;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
......@@ -49,11 +58,10 @@ page {
}
.button {
padding: 24rpx 32rpx;
position: fixed;
bottom: 0;
display: flex;
margin-left: 32rpx;
padding-bottom: 32rpx;
background: white;
}
......
......@@ -3,10 +3,11 @@
<view class="headImg">
<image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/>
<text a:else>{{item.username.substring(0, 1)}}</text>
<text a:if="{{conflictPeople.includes(item.userId)}}"class="conflict"></text>
</view>
<view class="info">
<text class="name">{{item.username}}</text>
<text class="close iconshanchu iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
<text class="close iconshanchu iconfont" a:if="{{!!scheduleItem?(organizer == permissions?(permissions!=item.userId):(permissions!=item.userId&&!requireUsers.includes(item.userId))):(permissions!=item.userId)}}" data-userId="{{item.userId}}" onTap="delParticipants"></text>
</view>
</view>
<view class="button">
......
......@@ -7,44 +7,88 @@ create.Page({
time1: '',
time2: '',
data: {
scheduleItem: '',
requireUsers: [],
organizer: '',
permissions: '',
requireUsersInfo: []
},
onLoad(event) {
let permissions = getApp().globalData.userid
let scheduleItem = JSON.parse(event.scheduleItem)
let organizer = event.organizer
let requireUsers = JSON.parse(event.requireUsers)
let requireUsersInfo = JSON.parse(event.requireUsersInfo)
this.setData({
time1: event.time1,
time2: event.time1
requireUsers: requireUsers,
organizer: organizer,
scheduleItem: scheduleItem,
time1: scheduleItem.startTime,
time2: scheduleItem.endTime,
permissions: permissions,
requireUsersInfo: requireUsersInfo
})
dd.setNavigationBar({
title: `参会人(${this.store.data.participatorList.length}人)`
})
this.conflict()
},
// 保存信息
saveInfo() {
this.conflict()
dd.navigateBack({
delta: 1
})
},
// 添加参会人
addParticipants() {
const _that = this
let require = []
let select = []
if (!this.data.scheduleItem || this.data.organizer === getApp().globalData.userid) {
select = this.store.data.participatorUserId
require = [getApp().globalData.userid]
select.forEach((item, index) => {
if (item.userId == getApp().globalData.userid) {
select.splice(index, 1)
}
})
} else {
select = [...this.store.data.participatorUserId]
require = [...this.data.requireUsers]
}
select = _that.selectedelRequired(require, select).pickedUsers
dd.complexChoose({
title: "选择参会人", //标题
multiple: true, //是否多选
limitTips: "超出了", //超过限定人数返回提示
maxUsers: 100, //最大可选人数
pickedUsers: _that.store.data.participatorUserId, //已选用户
requiredUsers: [], //必选用户(不可取消选中状态
pickedUsers: select, //已选用户
requiredUsers: require, //必选用户(不可取消选中状态)
responseUserOnly: true, //返回人,或者返回人和部门
success: function (res) {
res.users.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.headUrl })
_that.store.data.participatorUserId.push(item.userId)
})
if (!_that.data.scheduleItem || _that.data.organizer === getApp().globalData.userid) {
_that.store.data.participatorList = []
_that.store.data.participatorUserId = []
res.users.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.avatar })
_that.store.data.participatorUserId.push(item.userId)
})
_that.store.data.participatorList.push({ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar })
_that.store.data.participatorUserId.push(getApp().globalData.userid)
} else {
_that.store.data.participatorList = []
_that.store.data.participatorUserId = []
res.users.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.name, headUrl: item.avatar })
_that.store.data.participatorUserId.push(item.userId)
})
_that.data.requireUsersInfo.forEach((item, index) => {
_that.store.data.participatorList.push({ userId: item.userId, username: item.username, headUrl: item.headUrl })
_that.store.data.participatorUserId.push(item.userId)
})
}
_that.store.data.participatorList = _that.setArrary(_that.store.data.participatorList)
_that.store.data.participatorUserId = [...new Set(_that.store.data.participatorUserId)]
_that.conflict()
_that.update()
dd.setNavigationBar({
title: `参会人(${_that.store.data.participatorList.length}人)`
})
},
fail: function (err) {
}
......@@ -70,6 +114,7 @@ create.Page({
dd.setNavigationBar({
title: `参会人(${this.store.data.participatorList.length}人)`
})
this.conflict()
},
// 数组去重
setArrary(arr, userId) {
......@@ -90,14 +135,33 @@ create.Page({
}
getUserScheduleInTime(data).then(res => {
for (let value in res.data.data) {
if (!!res.data.data[value].length) {
this.store.data.conflictPeople.push(value)
if (!!this.data.scheduleItem) {
if (res.data.data[value].length > 1) {
this.store.data.conflictPeople.push(value)
}
} else {
if (res.data.data[value].length > 0) {
this.store.data.conflictPeople.push(value)
}
}
}
this.update()
dd.navigateBack({
delta: 1
})
})
},
// 已选用户去中去掉必选用户
selectedelRequired(req, pic) {
for (let i = 0; i < req.length; i++) {
for (let m = 0; m < pic.length; m++) {
if (req[i] == pic[m]) {
pic.splice(m, 1)
m--;
}
}
}
return {
requiredUsers: req,
pickedUsers: pic
}
}
});
......@@ -18,7 +18,7 @@ create.Page({
title: '选择重复'
})
let week = new Date().getDay()
this.data.repeatList[2].weekDayList = [this.data.week1[week]]
this.data.repeatList[2].weekDayList = [this.data.week1[week -1]]
this.data.repeatList[2].text = this.data.week2[week -1]
this.setData({
repeatList: this.data.repeatList
......
......@@ -4,6 +4,7 @@ page {
font-family: PingFangSC-Regular;
font-size: 34rpx;
color: #191F25;
padding-bottom: 180rpx;
}
::-webkit-scrollbar {
......@@ -74,11 +75,13 @@ page {
background: #3296Fa;
margin-right: 16rpx;
}
.imageGroup image {
vertical-align: top;
width: 58rpx;
height: 58rpx;
border-radius: 50%;
}
}
.number {
margin-right: 16rpx;
......@@ -136,13 +139,96 @@ page {
margin-left: 4rpx;
}
.tip {
.dynamicDetail {
background: #fff;
overflow: hidden;
padding: 48rpx 32rpx;
}
.latestTip {
text-align: center;
margin-top: 48rpx;
font-size: 24rpx;
font-size: 26rpx;
color: rgba(25, 31, 37, 0.56);
}
.dynamicList {
display: flex;
margin-top: 32rpx;
}
.dynamicleft {
text-align: center;
color: #fff;
font-size: 30rpx;
width: 58rpx;
margin-right: 16rpx;
height: 58rpx;
line-height: 58rpx;
border-radius: 50%;
background: #3296FA;
vertical-align: top;
}
.dynamicleft>image, .dynamicleft>text {
display: inline-block;
flex: 0 0 58rpx;
vertical-align: top;
width: 58rpx;
height: 58rpx;
border-radius: 50%;
background: #3296FA;
}
.dynamicMinutes>text {
margin-right: 10rpx;
font-size: 26rpx;
color: rgba(25, 31, 37, 0.40);
line-height: 37rpx;
}
.dynamicDetail .describe {
font-size: 26rpx;
line-height: 37rpx;
margin-top: 8rpx;
}
.file {
width: 612rpx;
padding-right: 8rpx;
height: 88rpx;
line-height: 88rpx;
background: #F6F7F8;
border-radius: 2px;
margin-top: 16rpx;
border-bottom: 1rpx solid transparent;
display: flex;
position: relative;
}
.fileImage {
width: 60rpx;
flex: 0 0 60rpx;
height: 72rpx;
margin: 8rpx 37rpx 8rpx 8rpx;
background: url(../../assests/all.png) center /100% 100%;
}
.fileName {
padding-right: 8rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 26rpx;
}
.otherTip {
text-align: center;
font-size: 26rpx;
color: rgba(25, 31, 37, 0.40);
line-height: 37rpx;
margin-top: 32rpx;
}
.bottom {
width: 686rpx;
display: flex;
......@@ -178,6 +264,42 @@ page {
line-height: 44rpx;
}
.modFile {
padding: 0;
display: flex;
color: white;
height: 57rpx;
border-radius: 6px;
background: rgba(0, 0, 0, 0.8);
position: absolute;
top: -73rpx;
left: 50%;
}
.modFile>view {
width: 95rpx;
line-height: 57rpx;
text-align: center;
font-size: 26rpx;
}
.ediFile {
border-right: 1rpx solid #fff;
}
.modFile .triangle {
position: absolute;
bottom: -28rpx;
width: 0;
left: 50%;
margin-left: -16rpx;
height: 0;
border-top: 16rpx solid rgba(0, 0, 0, 0.8);
border-bottom: 16rpx solid rgba(0, 0, 0, 0);
border-right: 16rpx solid rgba(0, 0, 0, 0);
border-left: 16rpx solid rgba(0, 0, 0, 0);
}
.participatorStaus {
width: 20rpx;
height: 20rpx;
......@@ -195,11 +317,50 @@ page {
.cancel {
background: #E60012;
}
.blank {
width: 650rpx;
overflow-x: scroll;
white-space: nowrap;
}
.blank>text {
margin-right: 10rpx;
}
.pdf {
background: url(../../assests/pdf.png) center /100% 100%;
}
.image {
background: url(../../assests/image.png) center /100% 100%;
}
.docx {
background: url(../../assests/docx.png) center /100% 100%;
}
.mov {
background: url(../../assests/mp4.png) center /100% 100%;
}
.mp4 {
background: url(../../assests/mp4.png) center /100% 100%;
}
.ppt {
background: url(../../assests/ppt.png) center /100% 100%;
}
.pptx {
background: url(../../assests/ppt.png) center /100% 100%;
}
.pdf {
background: url(../../assests/pdf.png) center /100% 100%;
}
.xlsx {
background: url(../../assests/xlsx.png) center /100% 100%;
}
.zip {
background: url(../../assests/zip.png) center /100% 100%;
}
\ No newline at end of file
......@@ -21,10 +21,12 @@
<view class="icon iconshijian iconfont">
</view>
<view class="text" a:if="{{isAcrossDay}}">
{{`
${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${startTime.substring(11, 16)} 至
${endTime.substring(5, 7)}月${endTime.substring(8, 10)}日 ${endTime.substring(11, 16)}
`}}
<view>
{{`
${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${startTime.substring(11, 16)} 至
${endTime.substring(5, 7)}月${endTime.substring(8, 10)}日 ${endTime.substring(11, 16)}
`}}
</view>
</view>
<view class="text" a:else>
{{`${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${week} ${startTime.substring(11, 16)}-${endTime.substring(11, 16)}`}}
......@@ -32,15 +34,15 @@
</view>
</view>
<!-- 参会人 -->
<view class="participants">
<view class="participants" onTap="nextPage" data-nextPage="participants">
<view class="icon iconcanhuiren1 iconfont">
</view>
<view class="scroll" v-if="{{!!userList.length}}" onTap="nextPage" data-nextPage="participants">
<view class="scroll" v-if="{{!!userList.length}}">
<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 a:if="{{!!item.participator.confirmAttendance}}" class="participatorStaus {{item.participator.confirmAttendance==1?'accept':'cancel'}} "></text>
</text>
</text>
</view>
......@@ -70,7 +72,7 @@
<view class="icon iconhuiyimiaoshu iconfont">
</view>
<view class="text">
{{remark}}
{{remark}}
</view>
</view>
<!-- 会议动态 -->
......@@ -85,10 +87,54 @@
<text class="icontianjia iconfont"></text>
</view>
</view>
<!-- 动态展示 -->
<view class="tip">
李文 修改了会议 2月12日 12:10
<!-- 动态详情展示 -->
<view class="dynamicDetail">
<view class="latestTip">
李文 修改了会议 2月12日 12:10
</view>
<view class="dynamicList" a:for="{{allFileInfo}}">
<view class="dynamicleft">
<image a:if="{{!!item.uploaderInfo.headUrl}}" mode="scaleToFill" src="{{item.uploaderInfo.headUrl}}"/>
<text a:else>{{item.uploaderInfo.username.substring(0,1)}}</text>
</view>
<view class="dynamicright">
<view class="dynamicMinutes">
<text>{{item.username}}</text>
<text>5分钟前</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 class="fileName">
{{item2.fileName}}
</view>
<view class="modFile" a:if="{{organizer == pemissions?(item2.fileId == fileId):(item2.fileId == fileId&&item.uploaderInfo.userId==pemissions)}}">
<view class="ediFile" data-nextPage="editFile" catchTap="nextPage" data-file="{{item}}">
编辑
</view>
<view class="delFile" catchTap="delFile" data-file="{{item}}">
删除
</view>
<view class="triangle">
</view>
</view>
</view>
</view>
</view>
<view class="otherTip">
大鹏 将 海棠 添加到会议 17:03
</view>
<view class="otherTip">
大鹏 修改了会议 今天 16:14
</view>
<view class="otherTip">
大鹏 修改了会议 今天 16:14
</view>
</view>
<!-- 底部按钮 -->
<view class="bottom">
<view class="buttonGroup" data-nextPage="edit" onTap="nextPage">
<text class="icondidianmiaoshu iconfont"></text>
......
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
import { deleteSchedule, getScheduleDetail, uploadPermissions, previewPermissions } from '../../api/request.js'
import { getDynamicTip, addSchedule, delFile, getDynamic, deleteSchedule, getScheduleDetail, uploadPermissions, previewPermissions } from '../../api/request.js'
create.Page({
store: exampleStore,
useAll: true,
......@@ -16,19 +16,27 @@ create.Page({
previewSpaceId: '',
scheduleItem: '',
planDate: '',
scheduleTemplateId: ''
allFileInfo: '',
scheduleTemplateId: '',
getDynamicTip: [],
fileId: '',
organizer: '',
pemissions: ''
},
onLoad(event) {
let scheduleItem = JSON.parse(event.scheduleItem)
this.setData({
scheduleItem: scheduleItem
scheduleItem: scheduleItem,
pemissions: getApp().globalData.userid
})
dd.setNavigationBar({
title: '会议详情'
})
},
onShow() {
this.setData({
fileId: ''
})
let data = {
id: this.data.scheduleItem.id,
planDate: this.data.scheduleItem.planDate,
......@@ -40,6 +48,7 @@ create.Page({
location: res.data.data.location,
startTime: res.data.data.startTime,
endTime: res.data.data.endTime,
organizer: res.data.data.organizer,
week: this.data.weeks[new Date(res.data.data.startTime).getDay() - 1]
})
this.store.data.userList = res.data.data.userList
......@@ -53,7 +62,19 @@ create.Page({
uploadSpaceId: res.data.data
})
})
// 获取动态详情
if (!!this.data.scheduleItem.id) {
this.showFile(this.data.scheduleItem.id)
} else {
let getId = {
scheduleTemplateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate,
createModel: 'auto'
}
addSchedule(getId).then(success => {
this.showFile(success.data.id)
})
}
},
// 是否跨天
acrossDay(time1, time2) {
......@@ -84,17 +105,11 @@ create.Page({
upload() {
const _that = this
dd.uploadAttachmentToDingTalk({
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"]
image: { multiple: true, compress: true, max: 9, spaceId: _that.data.uploadSpaceId },
space: { spaceId: _that.data.uploadSpaceId, compress: true, isCopy: 1, max: 9 },
types: ["photo", "camera", "space"],
success: (res) => {
previewPermissions(res.data[0].fileId).then(success => {
_that.setData({
previewSpaceId: success.data.data
})
_that.preview(res.data[0].fileId, res.data[0].fileSize, res.data[0].fileType, res.data[0].fileName)
})
dd.navigateTo({ url: `./../uploadFile/uploadFile?scheduleItem=${JSON.stringify(_that.data.scheduleItem)}&upLoadInfo=${JSON.stringify(res)}` })
},
fail: (err) => {
dd.alert({
......@@ -103,6 +118,90 @@ create.Page({
}
})
},
// 文件预览
preview(event) {
const _that = this
let file = event.target.dataset.file
previewPermissions(file.fileId).then(res => {
_that.setData({
previewSpaceId: res.data.data
})
console.log(res.data.data)
dd.previewFileInDingTalk({
corpId: dd.corpId,
spaceId: _that.data.previewSpaceId,
fileId: file.fileId,
fileName: file.fileName,
fileSize: file.fileSize,
fileType: file.fileType
})
})
},
// 删除文件
delFile(event) {
const _that = this
this.setData({
fileId: ''
})
let data = event.target.dataset.file.id
dd.confirm({
title: '温馨提示',
content: '确认删除本次上传文件吗',
confirmButtonText: '确定',
cancelButtonText: '取消',
success: (success) => {
if (!!success.confirm) {
if (!!this.data.scheduleItem.id) {
delFile(data).then(res => {
_that.showFile(this.data.scheduleItem.id)
})
} else {
let getId = {
scheduleTemplateId: _that.data.scheduleItem.scheduleTemplateId,
planDate: _that.data.scheduleItem.planDate,
createModel: 'auto'
}
addSchedule(getId).then(success => {
delFile(data).then(res => {
_that.showFile(success.data.id)
})
})
}
}
}
})
},
// 展示文件动态信息
showFile(id) {
let data = {
scheduleId: id,
}
getDynamic(data).then(res => {
let allFileInfo = []
if (!!res.data.data) {
res.data.data.forEach((item, index) => {
if (!!item.scheduleAccessory) {
item.scheduleAccessory.fileInfos = JSON.parse(item.scheduleAccessory.fileInfos)
item.scheduleAccessory.uploaderInfo = JSON.parse(item.scheduleAccessory.uploaderInfo)
allFileInfo.push(item.scheduleAccessory)
}
})
}
this.setData({
allFileInfo: allFileInfo
})
})
},
touchStart(event) {
},
onTouchEnd(event) {
},
// 长按事件
longPress(event) {
this.setData({
fileId: event.target.dataset.file.fileId
})
},
// 跳转下一页
nextPage(event) {
switch (event.target.dataset.nextPage) {
......@@ -110,23 +209,14 @@ create.Page({
dd.navigateTo({ url: `./../attendingSituation/attendingSituation?userList=${JSON.stringify(this.store.data.userList)}` })
break;
case 'edit':
console.log(this.data.scheduleItem.id)
dd.navigateTo({ url: `./../createOrEditSchedule/createOrEditSchedule?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` })
break;
case 'editFile':
this.setData({
fileId: ''
})
dd.navigateTo({ url: `./../editFile/editFile?file=${JSON.stringify(event.target.dataset.file)}` })
break;
}
},
// 预览文件
preview(fileId, fileSize, fileType, fileName) {
dd.previewFileInDingTalk({
corpId: dd.corpId,
spaceId: this.data.previewSpaceId,
fileId: fileId,
fileName: fileName,
fileSize: fileSize,
fileType: fileType
})
}
});
@import "../../font/iconfont.acss";
page {
background: #fff;
font-family: PingFangSC-Regular;
font-size: 34rpx;
color: #191F25;
padding-bottom: 180rpx;
}
.fileList {
margin-top: 32rpx;
padding: 0 32rpx;
display: flex;
justify-content: space-between;
}
.file {
background: #F6F7F8;
border-radius: 2rpx;
width: 634rpx;
height: 88rpx;
line-height: 88rpx;
display: flex;
overflow: hidden;
}
.fileimage {
flex: 0 0 58rpx;
width: 60rpx;
height: 72rpx;
background: url(../../assests/all.png) center /100% 100%;
margin: 8rpx 16rpx 8rpx 8rpx;
}
.fileName {
font-size: 26rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.close {
line-height: 88rpx;
font-size: 30rpx;
color: rgba(25, 31, 37, 0.40);
text-align: right;
}
.add {
padding: 0 32rpx;
margin-top: 40rpx;
}
.icontianjia {
line-height: 33rpx;
color: #3296fa;
margin-right: 16rpx;
}
.addText {
vertical-align: top;
font-size: 24rpx;
color: #3296FA;
}
.save {
padding: 32rpx 34rpx;
position: fixed;
bottom: 0;
}
.saveButton {
font-size: 36rpx;
width: 686rpx;
line-height: 96rpx;
text-align: center;
color: #fff;
background: #3296FA;
border: 1rpx solid rgba(25, 31, 37, 0.12);
border-radius: 48rpx;
}
.pdf {
background: url(../../assests/pdf.png) center /100% 100%;
}
.image {
background: url(../../assests/image.png) center /100% 100%;
}
.docx {
background: url(../../assests/docx.png) center /100% 100%;
}
.mov {
background: url(../../assests/mp4.png) center /100% 100%;
}
.mp4 {
background: url(../../assests/mp4.png) center /100% 100%;
}
.ppt {
background: url(../../assests/ppt.png) center /100% 100%;
}
.pptx {
background: url(../../assests/ppt.png) center /100% 100%;
}
.pdf {
background: url(../../assests/pdf.png) center /100% 100%;
}
.xlsx {
background: url(../../assests/xlsx.png) center /100% 100%;
}
.zip {
background: url(../../assests/zip.png) center /100% 100%;
}
\ No newline at end of file
<view class="uploadFile">
<view class="describe">
<textarea class="textarea" onInput="inputDes" placeholder="添加文件描述..." maxlength="-1" />
</view>
<view class="fileList" a:for="{{upLoadInfo.data}}">
<view class="file">
<view class="fileimage {{item.fileType==('png' || 'jpg' || 'svg' || 'jpeg' || 'JPG') ?'image': item.fileType}}">
</view>
<view class="fileName">
{{item.fileName}}
</view>
</view>
<view class="close iconshanchu iconfont" data-item="{{item}}" onTap="close">
</view>
</view>
<view class="add" onTap="add">
<text class="icontianjia iconfont"></text>
<text class="addText">继续添加</text>
</view>
<view class="save">
<view class="saveButton" onTap="save">
保存
</view>
</view>
</view>
\ No newline at end of file
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
import { saveFileInfo, addSchedule, uploadPermissions, previewPermissions } from '../../api/request.js'
create.Page({
store: exampleStore,
useAll: true,
data: {
scheduleItem: '',
upLoadInfo: '',
descript: '',
uploadSpaceId: ''
},
onLoad(event) {
let scheduleItem = JSON.parse(event.scheduleItem)
let upLoadInfo = JSON.parse(event.upLoadInfo)
this.setData({
scheduleItem: scheduleItem,
upLoadInfo: upLoadInfo
})
dd.setNavigationBar({
title: '上传文件'
})
},
onShow() {
},
inputDes(event) {
let value = event.detail.value
this.setData({
descript: value
})
},
close(event) {
let fileId = event.target.dataset.item.fileId
this.data.upLoadInfo.data.forEach((item, index) => {
if (item.fileId == fileId) {
this.data.upLoadInfo.data.splice(index, 1)
return
}
})
this.setData({
upLoadInfo: this.data.upLoadInfo
})
},
add() {
uploadPermissions().then(res => {
this.setData({
uploadSpaceId: res.data.data
})
const _that = this
dd.uploadAttachmentToDingTalk({
image: { multiple: true, compress: false, max: 9, spaceId: this.data.uploadSpaceId },
space: { spaceId: this.data.uploadSpaceId, max: 9 },
file: { spaceId: this.data.uploadSpaceId, max: 9 },
types: ["photo", "camera", "space"],//PC端仅支持["photo","file","space"]
success: (res) => {
_that.data.upLoadInfo.data.push(...res.data)
_that.setData({
upLoadInfo: _that.data.upLoadInfo
})
},
fail: (err) => {
}
})
})
},
// 点击保存
save() {
if (!!this.data.scheduleItem.id) {
this.saveUpload(this.data.scheduleItem.id)
} else {
let getId = {
scheduleTemplateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate,
createModel: 'auto'
}
addSchedule(getId).then(success => {
this.data.saveUpload(success.data.id)
})
}
},
// 保存的接口
saveUpload(id) {
let data = {
scheduleId: id,
uploader: getApp().globalData.userid,
uploaderInfo: JSON.stringify({
userId: getApp().globalData.userid,
username: getApp().globalData.name,
headUrl: getApp().globalData.avatar
}),
thirdStoreTenant: 'dingTalk',
fileInfos: JSON.stringify(this.data.upLoadInfo.data),
descript: this.data.descript
}
saveFileInfo(data).then(res => {
dd.navigateBack({
delta: 1
})
})
}
});
{}
\ 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