Commit 03506dc0 by liang ce
parents 03c669cf 85884871
......@@ -24,7 +24,11 @@ export default function http (data) {
} else {
return new Promise((resolve, rejects) => {
login().then(res => {
getApp().globalData.token = res.data.data.accessToken.access_token
getApp().globalData.token = res.data.data.accessToken.access_token //'3a025eee-15ae-4805-9214-fe0599d47f17' //
// getApp().globalData.token = "157bad88-d68b-4d80-bec1-375f3756a398"
// =======
// getApp().globalData.token = res.data.data.accessToken.access_token
// >>>>>>> a075e286c28564b6fc88185eaa17672b9d65efcb
getApp().globalData.name = res.data.data.oapiUser.name
getApp().globalData.userid = res.data.data.oapiUser.userid
getApp().globalData.avatar = res.data.data.oapiUser.avatar
......
......@@ -186,9 +186,25 @@ export function uploadPermissions() {
})
}
// 文件预览
export function previewPermissions() {
export function previewPermissions(fileIds) {
return $http({
method: 'get',
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=download&ddUserId=${getApp().globalData.userid}`
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=download&ddUserId=${getApp().globalData.userid}&fileIds=${fileIds}`
})
}
// 编辑日程
export function modifySchedule(data) {
return $http({
method: 'post',
data: JSON.stringify(data),
url: `/meet/schedule/modifySchedule`
})
}
// 删除日程
export function deleteSchedule(data) {
return $http({
method: 'post',
data: JSON.stringify(data),
url: `/meet/schedule/deleteSchedule`
})
}
\ No newline at end of file
{
"pages": [
"pages/index/index",
"pages/addRemark/addRemark",
"pages/createOrEditSchedule/createOrEditSchedule",
"pages/remind/remind",
"pages/repeatMechanism/repeatMechanism",
"pages/scheduleDetail/scheduleDetail",
"pages/attendingSituation/attendingSituation",
"pages/createOrEditSchedule/createOrEditSchedule",
"pages/place/place",
"pages/participantsDetail/participantsDetail"
],
......
@import "../../font/iconfont.acss";
page {
background: #fff;
font-family: PingFangSC-Regular;
font-size: 30rpx;
color: #191F25;
line-height: 42rpx;
padding-bottom: 180rpx;
}
.confirm>view {
width: 100%;
height: 96rpx;
font-size: 36rpx;
text-align: center;
line-height: 96rpx;
color: #fff;
background: #3296FA;
border: 1prx solid rgba(25, 31, 37, 0.12);
border-radius: 48rpx;
}
.confirm {
background: #fff;
width: 682rpx;
padding: 32rpx 34rpx;
position: fixed;
bottom: 0;
}
.remarkInput {
padding: 0 32rpx;
}
\ No newline at end of file
<view>
<view class="remarkInput">
<textarea onInput="getRemark" maxlength="-1" auto-height placeholder="添加内容描述" value="{{remark}}" />
</view>
<!-- 保存 -->
<view class="confirm" onTap="save">
<view>
完成
</view>
</view>
</view>
\ No newline at end of file
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
create.Page({
store: exampleStore,
useAll: true,
data: {},
onLoad() {
dd.setNavigationBar({
title: '添加描述'
})
},
getRemark(event) {
this.store.data.remark = event.detail.value
this.update()
},
save() {
dd.navigateBack({
delta: 1
})
}
});
{}
\ No newline at end of file
......@@ -4,6 +4,7 @@ page {
font-family: PingFangSC-Regular;
font-size: 34rpx;
color: #191F25;
padding-bottom: 180rpx;
}
::-webkit-scrollbar {
......@@ -169,8 +170,7 @@ page {
max-width: 400rpx;
}
.scrollPeople image,
.name {
.scrollPeople image, .name {
text-align: center;
line-height: 58rpx;
font-size: 28rpx;
......@@ -210,9 +210,11 @@ page {
opacity: 1;
color: rgba(25, 31, 37, 0.40);
}
.imageGroup {
position: relative;
}
.conflictTip {
font-size: 24rpx;
text-align: center;
......@@ -223,7 +225,7 @@ page {
border-radius: 50%;
background: #E60012;
position: absolute;
color: rgb(211, 190, 192);
color: rgb(211, 190, 192);
bottom: -1rpx;
right: 13rpx;
}
......@@ -237,7 +239,7 @@ page {
border-top: 1rpx solid rgba(25, 31, 37, 0.12);
height: 86rpx;
font-size: 28rpx;
white-space: nowrap;
white-space: nowrap;
line-height: 86rpx;
overflow-x: scroll;
}
......@@ -249,19 +251,100 @@ page {
.conflict {
color: #E60012;
}
.addParticipants {
width: 100%;
display: inline-block;
height: 100%;
}
.selectPlace {
display: flex;
justify-content: space-between;
}
.iconshanchu {
color: rgba(25, 31, 37, 0.28);
.iconshanchu {
color: rgba(25, 31, 37, 0.28);
}
.conflict {
margin-right: 10rpx;
}
.editList {
padding: 24rpx 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;
justify-content: space-around;
}
.listIcon {
line-height: 30rpx;
text-align: center;
font-size: 38rpx;
margin-bottom: 9rpx;
vertical-align: top;
}
.listText {
text-align: center;
font-size: 20rpx;
line-height: 26rpx;
}
.repeat {
background: #fff;
display: flex;
padding-left: 32rpx;
margin-top: 16rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.repeat .iconchongfu {
font-size: 40rpx;
vertical-align: top;
margin-right: 27rpx;
text-align: center;
line-height: 112rpx;
}
.repeatTime {
height: 112rpx;
line-height: 112rpx;
/* position: relative; */
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.repeatContaint {
width: 100%;
}
.repeat .iconshanchu {
float: right;
margin-right: 32rpx;
}
.terminationTime {
height: 112rpx;
line-height: 112rpx;
}
.describe {
background: #fff;
margin-top: 16rpx;
padding: 32rpx;
display: flex;
}
.describe .icondidianmiaoshu {
font-size: 40rpx;
margin-right: 27rpx;
}
.describeText {
width: 574rpx;
}
.describe .iconshanchu {
position: absolute;
right: 32rpx;
}
<view class="createOrEditSchedule">
<!-- 主题 -->
<view class="theme">
<input placeholder="添加主题" onInput="getTitle" />
<input placeholder="添加主题" onInput="getTitle" value="{{title}}" />
</view>
<!-- 时间 -->
<view class="time">
......@@ -35,13 +35,13 @@
</view>
</view>
<!-- 地点 -->
<view class="place">
<view class="place" a:if="{{!!id?(!!locationName?true:false):true}}">
<view class="icon iconfont icondingwei">
</view>
<view class="text" data-nextPage="place" onTap="nextPage">
<view class="selectPlace" a:if="{{!!locationName}}">
<text>{{locationName}}</text>
<text class="iconshanchu iconfont" catchTap="closePlace"></text>
<text class="iconshanchu iconfont" data-icon="icondingwei" catchTap="closeEditList"></text>
</view>
<text a:else>添加地点
</text>
......@@ -83,20 +83,86 @@
</view>
</view>
<!-- 提醒 -->
<view class="remind">
<view class="remind" a:if="{{aheadTimes.length}}">
<view class="icon iconfont iconfont iconhuiqiantixing">
</view>
<view class="text">
<text>
提前15分钟提醒
提前 <text a:for="{{aheadTimes}}" style="margin-right: 10rpx;">{{item}}</text>分钟提醒
</text>
<text class="close iconshanchu iconfont"></text>
<text class="close iconshanchu iconfont" data-icon="iconhuiqiantixing" catchTap="closeEditList"></text>
</view>
</view>
<!-- 重复 -->
<view class="repeat" a:if="{{!!repeatable}}">
<view class="iconfont iconchongfu">
</view>
<view class="repeatContaint">
<view class="repeatTime">
<text>{{recurrenceModel.model=='day_in_week'?(recurrenceModel.weekDayList.length==7?'每周重复':'每周的工作日重复'):recurrenceModel.model=='every_day'?'每天重复': '不重复'}}</text>
<view class="iconfont iconshanchu" data-icon="iconchongfu" catchTap="closeEditList">
</view>
</view>
<view class="terminationTime" onTap="selectTerminal">
<text a:if="{{!recurrenceModel.terminateTime}}">永不截止</text>
<text a:else>截止至{{recurrenceModel.terminateTime.substring(0,10)}}</text>
</view>
</view>.
<!--<view class="repeatTime"><view class="iconfont iconchongfu "></view><view class="repeatText">
每周重复</view><view class="iconfont iconshanchu"></view></view> -->
</view>
<!-- 描述 -->
<view class="describe" a:if="{{!!remark}}">
<view class="iconfont icondidianmiaoshu">
</view>
<view class="describeText">
{{remark}}
</view>
<view class="iconfont iconshanchu" data-icon="icondidianmiaoshu" catchTap="closeEditList">
</view>
</view>
<!-- 编辑列表 -->
<view class="editList" a:if="{{!!id}}">
<view a:if="{{!!id?(!!locationName?false:true):true}}" class="listGroup" onTap="editSchedule" data-icon="icondingwei">
<view class="listIcon iconfont icondingwei">
</view>
<view class="listText">
地点
</view>
</view>
<view a:if="{{!aheadTimes.length}}" class="listGroup" onTap="editSchedule" data-icon="iconhuiqiantixing">
<view class="listIcon iconfont iconhuiqiantixing">
</view>
<view class="listText">
提醒
</view>
</view>
<view a:if="{{!repeatable}}" class="listGroup" onTap="editSchedule" data-icon="iconchongfu">
<view class="listIcon iconfont iconchongfu">
</view>
<view class="listText">
重复
</view>
</view>
<view a:if="{{!remark}}" class="listGroup" onTap="editSchedule" data-icon="icondidianmiaoshu">
<view class="listIcon iconfont icondidianmiaoshu">
</view>
<view class="listText">
描述
</view>
</view>
<view class="listGroup" onTap="editSchedule" data-icon="iconshanchu">
<view class="listIcon iconfont iconshanchu">
</view>
<view class="listText">
删除
</view>
</view>
</view>
<!-- 保存 -->
<view class="save">
<view onTap="saveCreate">
立即创建
{{buttonText}}
</view>
</view>
</view>
......
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
import { addSchedule, getUserScheduleInTime, getHomeUserSchedule } from '../../api/request.js'
import { deleteSchedule, modifySchedule, addSchedule, getUserScheduleInTime, getHomeUserSchedule, getScheduleDetail } from '../../api/request.js'
import { stringify } from 'querystring';
create.Page({
store: exampleStore,
......@@ -14,8 +14,16 @@ create.Page({
time2: '',
week2: '',
propsTime: '',
weekList: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
id: '', // 日程ID 从详情页面传过来
buttonText: '立即创建'
},
onLoad() {
onLoad(event) {
this.store.data.remark = ''
this.store.data.aheadTimes = []
this.store.data.recurrenceModel = {
model: "no_repeat"
}
this.store.data.conflictPeople = []
this.store.data.participatorList = []
this.store.data.locationName = ''
......@@ -28,7 +36,7 @@ create.Page({
var y = date.getFullYear();
var m = (date.getMonth() + 1) < 10 ? "0" + (date.getMonth() + 1) : (date.getMonth() + 1);//获取当前月份的日期,不足10补0
var d = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();//获取当前几号,不足10补0
var weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
var weekList = this.data.weekList
var w = weekList[date.getDay()];
var h = date.getHours()
var min = date.getMinutes();
......@@ -37,7 +45,18 @@ create.Page({
time2: `${y}/${m}/${d} ${min < 30 ? h < 10 ? "0" + date.getHours() : date.getHours() : (h + 1) < 10 ? "0" + (date.getHours() + 1) : date.getHours() + 1}:${min < 30 ? '30' : '00'}`,
week1: w,
week2: w,
type: event.type,
id: event.id
})
if (!!event.id) {
this.getScheduleInfo()
dd.setNavigationBar({
title: '编辑会议'
})
this.setData({
buttonText: '保存编辑'
})
}
},
onShow() {
const _that = this
......@@ -142,6 +161,7 @@ create.Page({
_that.conflict()
},
fail: function (err) {
}
})
},
......@@ -170,37 +190,82 @@ create.Page({
},
// 保存
saveCreate() {
let data = {
title: this.data.title || '无主题',
location: {
longitude: '10',
latitude: '10',
locationName: this.store.data.locationName || ''
},
startTime: `${this.data.time1.replace(/\//g, "-")}:00`,
endTime: `${this.data.time2.replace(/\//g, '-')}:00`,
scheduleType: 'common',
noticeType: 'dd_notice',
participatorList: this.store.data.participatorList,
repeatable: 0,
aheadTimes: [],
recurrenceModel: {
model: 'no_repeat'
},
meetingRoomId: 222 || null
}
addSchedule(data).then(res => {
dd.navigateBack({
delta: 1
if (!!this.data.id) {
let data = {
modifyModel: 'only',
title: this.data.title || '无主题',
scheduleId: this.data.id,
location: {
longitude: '10',
latitude: '10',
locationName: this.store.data.locationName || ''
},
startTime: `${this.data.time1.replace(/\//g, "-")}:00`,
endTime: `${this.data.time2.replace(/\//g, '-')}:00`,
scheduleType: 'common',
noticeType: 'dd_notice',
participatorList: this.store.data.participatorList,
repeatable: this.store.data.repeatable,
aheadTimes: this.store.data.aheadTimes,
recurrenceModel: this.store.data.recurrenceModel,
meetingRoomId: 222 || null,
remark: this.store.data.remark
}
modifySchedule(data).then(res => {
dd.redirectTo({
url: '/pages/index/index'
})
})
})
} else {
let data = {
title: this.data.title || '无主题',
location: {
longitude: '10',
latitude: '10',
locationName: this.store.data.locationName || ''
},
startTime: `${this.data.time1.replace(/\//g, "-")}:00`,
endTime: `${this.data.time2.replace(/\//g, '-')}:00`,
scheduleType: 'common',
noticeType: 'dd_notice',
participatorList: this.store.data.participatorList,
repeatable: this.store.data.repeatable,
aheadTimes: this.store.data.aheadTimes,
recurrenceModel: this.store.data.recurrenceModel,
meetingRoomId: 222 || null
}
addSchedule(data).then(res => {
dd.navigateBack({
delta: 1
})
})
}
},
// 清除地点
closePlace() {
this.store.data.place = ""
// 关闭编辑项
closeEditList(event) {
switch (event.target.dataset.icon) {
case 'iconchongfu':
this.store.data.repeatable = 0
this.store.data.recurrenceModel = {
model: "no_repeat"
}
break;
case 'icondidianmiaoshu':
this.store.data.remark = null
break;
case 'iconhuiqiantixing':
this.store.data.aheadTimes = []
break;
case 'icondingwei':
this.store.data.locationName = null
break;
}
// this.store.data.place = ""
this.update()
},
// 会议冲突
conflict() {
......@@ -218,5 +283,84 @@ create.Page({
}
this.update()
})
}
},
// 编辑时获取详情页内容
getScheduleInfo() {
let data = {
id: this.data.id
}
getScheduleDetail(data).then(res => {
console.log(res.data.data.title)
let participatorUserId = []
let participatorList = []
res.data.data.userList.forEach((item, index) => {
participatorUserId.push(item.participator.userId)
participatorList.push(item.participator)
})
this.store.data.locationName = res.data.data.location.locationName
this.store.data.participatorUserId = participatorUserId
this.store.data.participatorList = participatorList
this.store.data.remark = res.data.data.remark
this.store.data.recurrenceModel = res.data.data.recurrenceModel
this.setData({
title: res.data.data.title,
time1: res.data.data.startTime.substring(0, 16),
time2: res.data.data.endTime.substring(0, 16),
week1: this.data.weekList[new Date(res.data.data.startTime).getDay()],
week2: this.data.weekList[new Date(res.data.data.endTime).getDay()],
aheadTimes: res.data.data.aheadTimes,
// describe: res.data.data.describe,
})
this.update()
this.conflict()
})
},
// 编辑日程
editSchedule(event) {
switch (event.target.dataset.icon) {
case 'iconchongfu':
dd.navigateTo({ url: `./../repeatMechanism/repeatMechanism` })
break;
case 'icondidianmiaoshu':
dd.navigateTo({ url: './../addRemark/addRemark' })
break;
case 'iconhuiqiantixing':
dd.navigateTo({ url: './../remind/remind' })
break;
case 'icondingwei':
dd.navigateTo({ url: './../place/place' })
break;
case 'iconshanchu':
let data = {
scheduleId: this.data.id,
identify: 'major',
deleteModel: 'only'
}
deleteSchedule(data).then(res => {
dd.redirectTo({
url: '/pages/index/index'
})
})
break;
}
},
// 选择终止时间
selectTerminal() {
let time2 = this.data.time2
dd.datePicker({
format: 'yyyy-MM-dd',
currentDate: '',
success: (res) => {
this.store.data.recurrenceModel.terminateTime = `${res.date} `
this.update()
},
error: (err) => {
console.log(JSON.stringify(err))
}
})
},
// 获取N年后的日
});
......@@ -216,6 +216,8 @@ Page({
},
nextDetail(e) {
let id = e.target.dataset.id
console.log(11111111)
console.log(id)
dd.navigateTo({ url: `./../scheduleDetail/scheduleDetail?id=${id}` })
},
lower() {
......
@import "../../font/iconfont.acss";
page {
background: #f6f6f6;
font-family: PingFangSC-Regular;
font-size: 34rpx;
color: #191F25;
padding-bottom: 180rpx;
}
.remindList {
background: #fff;
padding-left: 32rpx;
}
.remindContent {
line-height: 112rpx;
height: 112rpx;
display: flex;
padding-right: 32rpx;
justify-content: space-between;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.confirm {
background: #fff;
width: 682rpx;
padding: 32rpx 34rpx;
position: fixed;
bottom: 0;
}
.confirm>view {
width: 100%;
height: 96rpx;
font-size: 36rpx;
text-align: center;
line-height: 96rpx;
color: #fff;
background: #3296FA;
border: 1prx solid rgba(25, 31, 37, 0.12);
border-radius: 48rpx;
}
.iconxuanzhong {
color: #fff;
}
.select {
color: #1890FF;
}
<view>
<view class="remindList" a:for="{{remindList}}" data-item="{{item}}" onTap="selectTimes">
<view class="remindContent">
<view class="remindText">
{{item.text}}
</view>
<view class="iconfont iconxuanzhong {{aheadTimes.includes(item.time)?'select':''}}">
</view>
</view>
</view>
<view class="confirm" onTap="save">
<view>
完成
</view>
</view>
</view>
\ No newline at end of file
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
create.Page({
store: exampleStore,
useAll: true,
data: {
remindList: [
{ time: 0, text: '开始时' },
{ time: 5, text: '5分钟前' },
{ time: 15, text: '15分钟前' },
{ time: 30, text: '30分钟前' },
{ time: 60, text: '1小时前' },
{ time: 1440, text: '1天前' },
{ time: 2880, text: '2天前' },
{ time: 10080, text: '1周前' }
]
},
onLoad() {
dd.setNavigationBar({
title: '会前提醒'
})
},
selectTimes(event) {
if (this.store.data.aheadTimes.includes(event.target.dataset.item.time)) {
this.store.data.aheadTimes.forEach((item, index) => {
if (item == event.target.dataset.item.time) {
this.store.data.aheadTimes.splice(index, 1)
}
return
})
}
else {
this.store.data.aheadTimes.push(event.target.dataset.item.time)
}
this.update()
},
save() {
dd.navigateBack({
delta: 1
})
}
});
{}
\ No newline at end of file
@import "../../font/iconfont.acss";
page {
background: #f6f6f6;
font-family: PingFangSC-Regular;
font-size: 42rpx;
color: #191F25;
}
.repeatList {
line-height: 112rpx;
height: 112rpx;
background: white;
padding-left: 32rpx;
}
.repeatRight {
border-bottom: 1rpx solid;
height: 112rpx;
margin-bottom: 10rpx;
padding-right: 32rpx;
border-bottom: rgba(25, 31, 37, 0.12)
}
.icon {
float: right;
font-size: 40rpx;
color: white;
}
.select {
color: #1890FF;
}
\ No newline at end of file
<view>
<view class="repeatList" a:for="{{repeatList}}" data-item="{{item}}" onTap="selectRepeat">
<view class="repeatRight ">
<text>{{item.text}}</text>
<text class="iconfont iconxuanzhong icon {{recurrenceModel.model=='day_in_week'?(recurrenceModel.weekDayList.length==item.weekDayList.length?'select':''):recurrenceModel.model==item.model?'select': ''}}
"></text>
</view>
</view>
</view>
\ No newline at end of file
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
create.Page({
store: exampleStore,
useAll: true,
data: {
repeatList: [
{ model: 'no_repeat', text: '不重复', weekDayList: [] },
{ model: 'every_day', text: '每天重复', weekDayList: [] },
{ model: 'day_in_week', text: '每周重复', weekDayList: ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] },
{ model: 'day_in_week', text: '每周的工作日重复', weekDayList: ['MO', 'TU', 'WE', 'TH', 'FR'] }
]
},
onLoad() {
dd.setNavigationBar({
title: '选择重复'
})
},
// 选择重复机制
selectRepeat(event) {
switch (event.target.dataset.item.model) {
case 'no_repeat':
this.store.data.repeatable = 0
this.store.data.recurrenceModel = { model: "no_repeat" }
break;
case 'every_day':
this.store.data.repeatable = 1
this.store.data.recurrenceModel = { model: "every_day" }
break;
case 'day_in_week':
let weekDayList = event.target.dataset.item.weekDayList
this.store.data.repeatable = 1
this.store.data.recurrenceModel = { model: "day_in_week", weekDayList: weekDayList, terminateTime: '' }
break;
}
this.update()
dd.navigateBack({
delta: 1
})
}
});
{}
\ No newline at end of file
......@@ -35,7 +35,7 @@
<view class="participants">
<view class="icon iconcanhuiren1 iconfont">
</view>
<view class="scroll" v-if="{{!!userList.length}}" onTap="nextPage">
<view class="scroll" v-if="{{!!userList.length}}" onTap="nextPage" data-nextPage="participants">
<text class="imageGroup" a:for="{{userList}}" a:for-item="item">
<text>
<image a:if="{{!!item.participator.headUrl}}" mode="scaleToFill" src="{{item.participator.headUrl}}"/>
......@@ -58,11 +58,11 @@
</view>
</view>
<!-- 会议描述 -->
<view class="describe" a:if="{{!!describe}}">
<view class="describe" a:if="{{!!remark}}">
<view class="icon iconhuiyimiaoshu iconfont">
</view>
<view class="text">
本次会议重要议程是确定交互最终方案。
{{remark}}
</view>
</view>
<!-- 会议动态 -->
......@@ -82,19 +82,19 @@
李文 修改了会议 2月12日 12:10
</view>
<view class="bottom">
<view class="buttonGroup">
<view class="buttonGroup" data-nextPage="edit" onTap="nextPage">
<text class="icondidianmiaoshu iconfont"></text>
<text>编辑</text>
</view>
<view class="buttonGroup">
<view class="buttonGroup" data-nextPage="edit" onTap="nextPage">
<text class="icondidianmiaoshu iconfont"></text>
<text>删除</text>
<text>编辑</text>
</view>
<view class="buttonGroup">
<view class="buttonGroup" data-nextPage="edit" onTap="nextPage">
<text class="icondidianmiaoshu iconfont"></text>
<text>编辑</text>
</view>
<view class="buttonGroup">
<view class="buttonGroup" data-nextPage="edit" onTap="nextPage">
<text class="icondidianmiaoshu iconfont"></text>
<text>编辑</text>
</view>
......
import { getScheduleDetail, uploadPermissions, previewPermissions } from '../../api/request.js'
Page({
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
import { deleteSchedule, getScheduleDetail, uploadPermissions, previewPermissions } from '../../api/request.js'
create.Page({
store: exampleStore,
useAll: true,
data: {
title: '',
location: '',
......@@ -7,19 +11,18 @@ Page({
endTime: '',
weeks: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
week: '',
userList: [],
isAcrossDay: true,
uploadSpaceId: '',
previewSpaceId: ''
previewSpaceId: '',
id: ''
},
onLoad(event) {
dd.setNavigationBar({
title: '会议详情'
})
// let data = {
// id: 1197
// }
this.setData({
id: event.id
})
let data = {
id: event.id
}
......@@ -29,23 +32,18 @@ Page({
location: res.data.data.location,
startTime: res.data.data.startTime,
endTime: res.data.data.endTime,
userList: res.data.data.userList,
aheadTimes: res.data.data.aheadTimes,
// describe: res.data.data.describe,
week: this.data.weeks[new Date(res.data.data.startTime).getDay() - 1]
})
this.store.data.userList = res.data.data.userList
this.store.data.remark = res.data.data.remark
this.acrossDay(res.data.data.startTime, res.data.data.endTime)
this.update()
return uploadPermissions()
}).then(res => {
this.setData({
uploadSpaceId: res.data.data
})
return previewPermissions()
}).then(res => {
this.setData({
previewSpaceId: res.data.data
})
})
},
// 是否跨天
......@@ -84,8 +82,12 @@ Page({
file: { spaceId: this.data.uploadSpaceId, max: 1 },
types: ["photo", "camera", "space"],//PC端仅支持["photo","file","space"]
success: (res) => {
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)
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)
})
},
fail: (err) => {
dd.alert({
......@@ -94,8 +96,15 @@ Page({
}
})
},
nextPage() {
dd.navigateTo({ url: `./../attendingSituation/attendingSituation?userList=${JSON.stringify(this.data.userList)}` })
nextPage(event) {
switch (event.target.dataset.nextPage) {
case 'participants':
dd.navigateTo({ url: `./../attendingSituation/attendingSituation?userList=${JSON.stringify(this.store.data.userList)}` })
break;
case 'edit':
dd.navigateTo({ url: `./../createOrEditSchedule/createOrEditSchedule?id=${this.data.id}` })
break;
}
},
preview(fileId, fileSize, fileType, fileName) {
dd.previewFileInDingTalk({
......
......@@ -4,7 +4,15 @@ class Store {
locationName: '',
conflictPeople: [],
participatorUserId: [], // 参会人的userId
userList: []
userList: [],
// 重复 重复机制
repeatable:0,
recurrenceModel:{
model:"no_repeat"
},
editList: [{ icon: 'icondingwei', text: '地点' }, { icon: 'iconhuiqiantixing', text: '提醒' }, { icon: 'iconchongfu', text: '重复' }, { icon: 'icondidianmiaoshu', text: '描述' }, { icon: 'iconshanchu', text: '删除' }],
remark: '', // 会议描述
aheadTimes: []
}
}
......
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