Commit 4424e79b by fengzhaoyu

还没有改完

parent 4fc73dc5
......@@ -2,7 +2,7 @@
<view class="desc" a:if='{{fileView.remark}}'>
{{fileView.remark}}
</view>
<view class="file-list" a:for="{{ fileView.fileDetailList}}">
<view class="file-list" a:for="{{fileInfos}}">
<view class="file-box {{isCanDelete ? 'file-box-close': ''}}" catchTap="preview" data-file="{{item}}">
<view class="file-icon {{item.mimeType}}"></view>
<view class="file-title">
......
import create from 'dd-store';
import pageStore from '../../pages/meetingDetail/store';
import { previewPermissions, previewOss } from '../../api/request.js'
import { previewPermissions, previewOss, uploadPermissions } from '../../api/request.js'
import openLink from "dingtalk-jsapi/api/biz/util/openLink";
create.Component({
......@@ -38,13 +38,22 @@ create.Component({
return
}
const file = e.target.dataset.file
dd.previewFileInDingTalk({
corpId: dd.corpId,
spaceId: file.spaceId,
fileId: file.fileId,
fileName: file.name,
fileSize: file.size,
fileType: file.mimeType,
console.log(file)
let data = {
ddUserId: getApp().globalData.userid,
type: 'download',
projectName: 'MING_MEETING',
fileIds: file.fileId
}
uploadPermissions(data).then(res => {
dd.previewFileInDingTalk({
corpId: dd.corpId,
spaceId: res.data.data,
fileId: file.fileId,
fileName: file.name,
fileSize: file.size,
fileType: file.mimeType,
})
})
},
//显示操作框
......
......@@ -142,6 +142,10 @@ create.Page({
})
this.closePopup()
},
// 保存重复
handleSaveRepeat() {
},
// 关闭popup
......@@ -198,7 +202,7 @@ create.Page({
endTime: this.$store.data.endTime.replace(/\//g, "-"),
meetingRoomId: this.$store.data.roomId,
scheduleType: this.$store.data.roomId ? 'meeting' : 'common',
participatorList: !!this.$store.data.participatorList.length ? this.$store.data.participatorList : [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' }],
participatorList: !!this.$store.data.showParticipatorList.length ? this.$store.data.showParticipatorList : [{ userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk' }],
repeatable: this.data.repeat.repeatable,
remark: this.data.remark,
recurrenceModel: this.data.repeat.recurrenceModel,
......
......@@ -17,12 +17,12 @@
<view class="permissionContant">
<view class="createTitle">
<view class="title">
<input placeholder-class="placeholder" placeholder="{{placeholder}}" class="text" onInput="onInput" data-type="title" data-selectType="common" value="{{title}}" onConfirm="onConfirm" focus="{{false}}" onBlur="onBlur"/>
<view class="icon iconfont iconicon_description1" a:if="{{!isShowRemark}}" onTap="addRemark">
<input placeholder-class="placeholder" placeholder="{{placeholder}}" class="text" onInput="handleChangeTitle" value="{{title}}" onConfirm="handleTitleSave" focus="{{false}}" onBlur="handleTitleSave"/>
<view class="icon iconfont iconicon_description1" a:if="{{!isShowRemark}}" onTap="handleOpenRemark">
</view>
</view>
<view class="remark" a:if="{{isShowRemark}}">
<input placeholder-class="placeholder" placeholder="请添加描述" class="text" onInput="onInput" data-type="remark" value="{{remark}}" onConfirm="onConfirm" onBlur="onBlur" focus="{{false}}"/>
<input placeholder-class="placeholder" placeholder="请添加描述" onInput="handleChangeRemark" value="{{meetingRemark}}" onConfirm="handleRemarkSave" onBlur="handleRemarkSave" focus="{{false}}"/>
</view>
</view>
<view class="permission" a:if="{{currentPeople != organizer}}">
......@@ -38,13 +38,13 @@
<view class="iconicon_location1 iconfont icon {{$data.locationName ? '' : 'noValueIcon'}}" a:else>
</view>
<view class="placeContaint">
<view class="noPlace" a:if="{{!$data.locationName}}" onTap="nextPage" data-nextPage="location">
<view class="noPlace" a:if="{{!$data.locationName}}" onTap="goSelectPlace">
添加地点
</view>
<view class="hasplace {{mrReserveStatus === 'Y' ? 'lineThrough' : ''}} " onTap="nextPage" data-nextPage="location" a:else>
<view class="hasplace {{mrReserveStatus === 'Y' ? 'lineThrough' : ''}}" onTap="goSelectPlace" a:else>
{{$data.locationName}}
</view>
<view class=" icon iconfont iconicon_close close" a:if="{{!!$data.locationName&&(currentPeople == organizer)}}" data-close="location" catchTap="close">
<view class=" icon iconfont iconicon_close close" a:if="{{!!$data.locationName&&(currentPeople == organizer)}}" catchTap="handleDeletePlace">
</view>
</view>
</view>
......@@ -56,15 +56,14 @@
</view>
<view class="timeContaint">
<view>
<view class="timeText" catchTap="showPopup" data-type='time'>
<view class="timeText" catchTap="handleTime" data-type='time'>
{{showTime}}
<!-- 3月1日 周日 14:00-16:00 -->
</view>
<view class="repeatModal" a:if="{{comListData.comSelectListId !== 0}}" catchTap="showPopup" data-type='repeat'>
{{comListData.repeatList[comListData.comSelectListId].text}}重复
<view class="repeatModal" a:if="{{repeat.repeatable !== 0}}" catchTap="handleRepeatModal">
{{repeat.repeatList[repeat.selectRepeatId].text}}重复
</view>
</view>
<view class="icon iconfont iconicon_repeat1" catchTap="showPopup" data-type='repeat' a:if="{{comListData.comSelectListId == 0}}">
<view class="icon iconfont iconicon_repeat1" catchTap="handleRepeatModal" a:if="{{repeat.repeatable == 0}}">
</view>
</view>
</view>
......@@ -73,26 +72,21 @@
</view>
<!-- participatorList participatorUserId 参会人 -->
<view class="participator">
<view class="iconicon_attender iconfont icon {{$data.participatorList.length>1 ? '' : 'noValueIcon'}}">
<view class="iconicon_attender iconfont icon {{$data.showParticipatorList.length>1 ? '' : 'noValueIcon'}}">
</view>
<view class="participatorContaint">
<view class="participatorText" a:if="{{$data.participatorList.length < 2}}" catchTap="showPopup" data-type='participator'>
<view class="participatorText" a:if="{{$data.showParticipatorList.length < 2}}" catchTap="handleAddParticipator">
添加参会人
</view>
<view class="participatorList" a:else>
<view class="participatorListTop">
<view class="participatorText">
<view>
{{$data.participatorList.length}}位参会人
</view>
<view class="conflictStatus" a:if="{{conflictPeople.length}}">
{{conflictPeople.length}}人日程安排冲突
</view>
{{$data.showParticipatorList.length}}位参会人
</view>
<view class="iconright iconfont icon" style=" vertical-align: middle" catchTap="nextPage" data-nextPage="participantsDetail"></view>
<view class="iconright iconfont icon" style=" vertical-align: middle" catchTap="goParticipantsDetail"></view>
</view>
<view class="participatorListBottom" catchTap="nextPage" data-nextPage="participantsDetail">
<view class="people" a:for="{{$data.participatorList.length > 10 ? [...$data.participatorList].splice(0, 11) : $data.participatorList}}">
<view class="participatorListBottom" catchTap="goParticipantsDetail">
<view class="people" a:for="{{$data.showParticipatorList.length > 10 ? [...$data.showParticipatorList].splice(0, 11) : $data.showParticipatorList}}">
<view class="headUrl">
<image a:if="{{item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}" />
<text a:else>{{item.platform==="outlook" ? item.username.substring(0, 2) : item.username.substring(item.username.length-2, item.username.length)}}
......@@ -102,13 +96,12 @@
</view>
<!--<view class="name">{{item.name}}</view> -->
</view>
<view class="addPeople iconfont iconicon_add1" catchTap="showPopup" data-type='participator'></view>
<view class="addPeople iconfont iconicon_add1" catchTap="handleAddParticipator" data-type='participator'></view>
</view>
</view>
</view>
</view>
<view onTap="goTasksPage">{{tasks.length}} 个任务</view>
<view onTap="goFilesPage">{{files.length}} 个附件</view>
<!--<view onTap="goTasksPage">{{tasks.length}} 个任务</view><view onTap="goFilesPage">{{files.length}} 个附件</view> -->
<!-- 删除该会议 -->
<template is="deleteBtn" onhandleDelete="" data="{{title: '删除该会议' }}"/>
</view>
......@@ -190,7 +183,7 @@
<text>{{item.updateTime}}</text>
</view>
<task-list a:if="{{item.meetingTaskSimpleViewModel}}" onChangeTaskStatusOnList="changeTaskStatus" taskView="{{item.meetingTaskSimpleViewModel}}" commentId="{{item.commentId}}" isCanEdit="{{false}}"/>
<file-list a:if="{{item.fileDetailList}}" fileView="{{item}}"/>
<file-list a:if="{{item.fileDetailList}}" fileInfos="{{item.fileDetailList}}"/>
<notes a:if="{{item.notes}}" meetingNotes="{{item.notes}}"/>
<view class="meeting-title" a:if="{{item.commentType === 'meeting'}}">创建了会议</view>
</view>
......@@ -210,11 +203,11 @@
<view class="loading-more" onTap="loadAffairMore" a:if="{{current < pages}}">点击加载更多动态...</view>
</block>
<view a:else></view>
<popup title="{{popup.title}}" show="{{popup.show}}" mask="true" onClose="closePopup1">
<list a:if="{{popup.type=='repeat'}}" dataComList="{{repeat.repeatList}}" onComSelectList="selectRepeatListItem"></list>
<meeting-time-picker a:if="{{'time' === popup.type}}" startTime="{{$data.startTime}}" endTime="{{$data.endTime}}" onComplete="onComplete" isIPX="{{isIPX}}"></meeting-time-picker></popup>
<popup a:show="{{popupShow}}" title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<meeting-time-picker a:if="{{'time' === comType}}" onComplete="onComplete" startTime="{{$data.startTime}}" endTime="{{$data.endTime}}" isIPX="{{isIPX}}"></meeting-time-picker>
<hlist a:if="{{'participator' === comType}}" dataComList="{{comHListData.contactData}}" onSelectComHList="selectComHList"></hlist>
<list multiple="{{comListData.multiple}}" onCompelete="selectAheadtimes" comSelectList="{{comListData.aheadTimesListId}}" complete="{{comType=='aheadTime' ? true : false}}" a:if="{{comType=='repeat' || comType=='aheadTime'}}" dataComList="{{comType=='repeat' ? comListData.repeatList : comListData.aheadTimesList}}" onComSelectList="selectComList" comSelectListId="{{comType=='repeat' ? comListData.comSelectListId : comListData.aheadTimesListId}}" iconType="{{comListData.iconType}}"></list>
<list a:if="{{comType == 'meetingWayModel'}}" dataComList="{{relatedAppPlatform.includes('zoom') ? comListData.meetingWayList: [comListData.meetingWayList[0]] }}" onComSelectList="selectComList" comSelectListId="{{comListData.meetingWayModelId}}" iconType="{{comListData.iconType}}"></list>
<notes a:if="{{comType == 'notesModal'}}" isEdit="{{true}}" onGetNotes="getNotes"/>
<comment a:if="{{comType == 'commentModal'}}" isEdit="{{true}}" onGetComment="getComment"/>
<remark a:if="{{comType == 'remarkModal'}}" onGetRemark="getRemark"/>
......
export function getSelectRepeatId(recurrenceModel, repeatList) {
for (let i = 0; i < repeatList.length; i++) {
if (repeatList[i].recurrenceModel.model === recurrenceModel.model) {
if (recurrenceModel.model === "weekly" && recurrenceModel.weekDayList.length === repeatList[i].recurrenceModel.weekDayList.length) {
return repeatList[i].id
}
return repeatList[i].id
}
}
return 0
}
export function getInitialPsarticipants(participants) {
let people = {}
for (let i = 0; i < participants.length; i++) {
people[participants[i].participator.userId] = participants[i].participator
}
return people
}
export function handleChangePeople(originUsers, nowUsers) {
const add = nowUsers.filter(it => !originUsers.includes(it))
const del = originUsers.filter(it => !nowUsers.includes(it))
return {
add: add,
del: del
}
}
\ No newline at end of file
......@@ -16,24 +16,22 @@ create.Page({
isIPX: false
},
onLoad(event) {
// this.reset()
if (event.scheduleItem) {
event.scheduleItem = decodeURIComponent(event.scheduleItem)
let scheduleItem = JSON.parse(event.scheduleItem)
this.setData({
scheduleItem: scheduleItem
})
// // this.reset()
// if (event.scheduleItem) {
// this.setData({
// scheduleItem: event.scheduleItem
// })
let contactPeople = []
let contactPeopleId = []
for (let value of this.$store.data.participatorList) {
contactPeople.push(value)
contactPeopleId.push(value.userId)
}
this.store.data.contactPeople = contactPeople
this.store.data.contactPeopleId = contactPeopleId
this.update()
}
// let contactPeople = []
// let contactPeopleId = []
// for (let value of this.$store.data.participatorList) {
// contactPeople.push(value)
// contactPeopleId.push(value.userId)
// }
// this.store.data.contactPeople = contactPeople
// this.store.data.contactPeopleId = contactPeopleId
// this.update()
// }
this.setData({
isIPX: checkFullScren(),
currentPeople: getApp().globalData.userid
......
......@@ -33,6 +33,7 @@ create.Page({
},
},
onLoad(e) {
debugger
if (e.scheduleItem) {
e.scheduleItem = decodeURIComponent(e.scheduleItem)
this.setData({
......
......@@ -2,7 +2,7 @@
<view class="describe">
<textarea value="{{description}}" class="textarea" onInput="inputChange" placeholder="添加文件描述..." maxlength="-1" />
</view>
<file-list fileView="{{{fileInfos: fileInfos}}}" isCanEdit="{{false}}" isPreview="{{false}}" isCanDelete="{{true}}"/>
<file-list fileInfos="{{fileInfos}}" isCanEdit="{{false}}" isPreview="{{false}}" isCanDelete="{{true}}"/>
<view class="addText" onTap="add">继续添加</view>
</view>
<view class="saveButton" onTap="saveUpload">
......
......@@ -44,15 +44,18 @@ create.Page({
}
let data = []
res.data.map(it => {
data.push({
this.store.data.fileInfos.push({
fileId: it.fileId,
name: it.fileName,
size: it.fileSize,
spaceId: it.spaceId,
platform: "dingTalk",
mimeType: it.fileType
})
})
this.store.data.fileInfos.push(data)
console.log(this.store.data.fileInfos)
this.update();
},
......@@ -83,8 +86,9 @@ create.Page({
fileList: fileInfos
}
}
console.log(data)
updateMeetingTask(data).then(res => {
console.log(res)
this.store.data.isNeedReloadList = true;
this.store.data.fileInfos = []
this.store.data.description = ''
......
......@@ -7,8 +7,8 @@ class Store {
roomId: '',
startTime: '',
endTime: '',
currentPeople: '',
originUsers: [],
originUsersId: [],
originalData: null,
indexNeedUpdate: false,
isIndexAffairListNeedUpdate: false,
......@@ -24,16 +24,14 @@ class Store {
this.data.roomId = ''
this.data.participatorList = {}
this.data.showParticipatorList = []
// this.data.originUsers = []
// this.data.originUsersId = []
this.data.originUsers = []
this.data.locationName = ''
this.data.onceMeetingContent = null
this.update();
}
resetEditData() {
this.data.roomId = ''
// this.data.originUsers = []
// this.data.originUsersId = []
this.data.originUsers = []
this.data.participatorList = {}
this.data.showParticipatorList = []
this.data.locationName = ''
......
......@@ -174,7 +174,6 @@ endTime 结束时间
*/
export function getShowTime(startTime, endTime) {
debugger
const weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
const weekIndex = new Date(startTime).getDay()
let isAcrossDay = false
......
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