Commit 1425f058 by fengzhaoyu

编辑暂存

parent c7ffaecb
...@@ -186,9 +186,11 @@ export function uploadPermissions() { ...@@ -186,9 +186,11 @@ export function uploadPermissions() {
}) })
} }
// 文件预览 // 文件预览
export function previewPermissions() { export function previewPermissions(fileIds) {
console.log(2222)
console.log(fileIds)
return $http({ return $http({
method: 'get', method: 'get',
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=download&ddUserId=${getApp().globalData.userid}` url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace?type=download&ddUserId=${getApp().globalData.userid}&fileIds=${fileIds}`
}) })
} }
\ No newline at end of file
{ {
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/createOrEditSchedule/createOrEditSchedule",
"pages/scheduleDetail/scheduleDetail", "pages/scheduleDetail/scheduleDetail",
"pages/attendingSituation/attendingSituation", "pages/attendingSituation/attendingSituation",
"pages/createOrEditSchedule/createOrEditSchedule",
"pages/place/place", "pages/place/place",
"pages/participantsDetail/participantsDetail" "pages/participantsDetail/participantsDetail"
], ],
......
...@@ -169,8 +169,7 @@ page { ...@@ -169,8 +169,7 @@ page {
max-width: 400rpx; max-width: 400rpx;
} }
.scrollPeople image, .scrollPeople image, .name {
.name {
text-align: center; text-align: center;
line-height: 58rpx; line-height: 58rpx;
font-size: 28rpx; font-size: 28rpx;
...@@ -210,9 +209,11 @@ page { ...@@ -210,9 +209,11 @@ page {
opacity: 1; opacity: 1;
color: rgba(25, 31, 37, 0.40); color: rgba(25, 31, 37, 0.40);
} }
.imageGroup { .imageGroup {
position: relative; position: relative;
} }
.conflictTip { .conflictTip {
font-size: 24rpx; font-size: 24rpx;
text-align: center; text-align: center;
...@@ -249,19 +250,47 @@ page { ...@@ -249,19 +250,47 @@ page {
.conflict { .conflict {
color: #E60012; color: #E60012;
} }
.addParticipants { .addParticipants {
width: 100%; width: 100%;
display: inline-block; display: inline-block;
height: 100%; height: 100%;
} }
.selectPlace { .selectPlace {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.iconshanchu { .iconshanchu {
color: rgba(25, 31, 37, 0.28); color: rgba(25, 31, 37, 0.28);
} }
.conflict { .conflict {
margin-right: 10rpx; 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-between;
}
.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;
}
\ No newline at end of file
...@@ -93,6 +93,19 @@ ...@@ -93,6 +93,19 @@
<text class="close iconshanchu iconfont"></text> <text class="close iconshanchu iconfont"></text>
</view> </view>
</view> </view>
<!-- 编辑列表 -->
<view class="editList" a:if="{{!!type}}">
<view class="listGroup" a:for="{{editList}}">
<view class="listIcon iconfont {{item.icon}}">
</view>
<view class="listText">
{{item.text}}
</view>
</view>
</view>
<!-- 保存 --> <!-- 保存 -->
<view class="save"> <view class="save">
<view onTap="saveCreate"> <view onTap="saveCreate">
......
import create from 'dd-store' import create from 'dd-store'
import exampleStore from '/stores/exampleStore' import exampleStore from '/stores/exampleStore'
import { addSchedule, getUserScheduleInTime, getHomeUserSchedule } from '../../api/request.js' import { addSchedule, getUserScheduleInTime, getHomeUserSchedule, getScheduleDetail } from '../../api/request.js'
import { stringify } from 'querystring'; import { stringify } from 'querystring';
create.Page({ create.Page({
store: exampleStore, store: exampleStore,
...@@ -14,8 +14,9 @@ create.Page({ ...@@ -14,8 +14,9 @@ create.Page({
time2: '', time2: '',
week2: '', week2: '',
propsTime: '', propsTime: '',
id: '' // 日程ID 从详情页面传过来
}, },
onLoad() { onLoad(event) {
this.store.data.conflictPeople = [] this.store.data.conflictPeople = []
this.store.data.participatorList = [] this.store.data.participatorList = []
this.store.data.locationName = '' this.store.data.locationName = ''
...@@ -37,7 +38,9 @@ create.Page({ ...@@ -37,7 +38,9 @@ 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'}`, 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, week1: w,
week2: w, week2: w,
type: event.type
}) })
}, },
onShow() { onShow() {
const _that = this const _that = this
...@@ -218,5 +221,10 @@ create.Page({ ...@@ -218,5 +221,10 @@ create.Page({
} }
this.update() this.update()
}) })
},
// 编辑时获取详情页内容
getScheduleInfo() {
} }
}); });
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<view class="participants"> <view class="participants">
<view class="icon iconcanhuiren1 iconfont"> <view class="icon iconcanhuiren1 iconfont">
</view> </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 class="imageGroup" a:for="{{userList}}" a:for-item="item">
<text> <text>
<image a:if="{{!!item.participator.headUrl}}" mode="scaleToFill" src="{{item.participator.headUrl}}"/> <image a:if="{{!!item.participator.headUrl}}" mode="scaleToFill" src="{{item.participator.headUrl}}"/>
...@@ -82,19 +82,19 @@ ...@@ -82,19 +82,19 @@
李文 修改了会议 2月12日 12:10 李文 修改了会议 2月12日 12:10
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="buttonGroup"> <view class="buttonGroup" data-nextPage="edit" onTap="nextPage">
<text class="icondidianmiaoshu iconfont"></text> <text class="icondidianmiaoshu iconfont"></text>
<text>编辑</text> <text>编辑</text>
</view> </view>
<view class="buttonGroup"> <view class="buttonGroup" data-nextPage="edit" onTap="nextPage">
<text class="icondidianmiaoshu iconfont"></text> <text class="icondidianmiaoshu iconfont"></text>
<text>删除</text> <text>编辑</text>
</view> </view>
<view class="buttonGroup"> <view class="buttonGroup" data-nextPage="edit" onTap="nextPage">
<text class="icondidianmiaoshu iconfont"></text> <text class="icondidianmiaoshu iconfont"></text>
<text>编辑</text> <text>编辑</text>
</view> </view>
<view class="buttonGroup"> <view class="buttonGroup" data-nextPage="edit" onTap="nextPage">
<text class="icondidianmiaoshu iconfont"></text> <text class="icondidianmiaoshu iconfont"></text>
<text>编辑</text> <text>编辑</text>
</view> </view>
......
...@@ -10,16 +10,17 @@ Page({ ...@@ -10,16 +10,17 @@ Page({
userList: [], userList: [],
isAcrossDay: true, isAcrossDay: true,
uploadSpaceId: '', uploadSpaceId: '',
previewSpaceId: '' previewSpaceId: '',
id: ''
}, },
onLoad(event) { onLoad(event) {
dd.setNavigationBar({ dd.setNavigationBar({
title: '会议详情' title: '会议详情'
}) })
// let data = { this.setData({
// id: 1197 id: event.id
// } })
let data = { let data = {
id: event.id id: event.id
} }
...@@ -40,12 +41,6 @@ Page({ ...@@ -40,12 +41,6 @@ Page({
this.setData({ this.setData({
uploadSpaceId: res.data.data uploadSpaceId: res.data.data
}) })
return previewPermissions()
}).then(res => {
this.setData({
previewSpaceId: res.data.data
})
}) })
}, },
// 是否跨天 // 是否跨天
...@@ -84,8 +79,12 @@ Page({ ...@@ -84,8 +79,12 @@ Page({
file: { spaceId: this.data.uploadSpaceId, max: 1 }, file: { spaceId: this.data.uploadSpaceId, max: 1 },
types: ["photo", "camera", "space"],//PC端仅支持["photo","file","space"] types: ["photo", "camera", "space"],//PC端仅支持["photo","file","space"]
success: (res) => { success: (res) => {
console.log(JSON.stringify(res.data), 111111) 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) _that.preview(res.data[0].fileId, res.data[0].fileSize, res.data[0].fileType, res.data[0].fileName)
})
}, },
fail: (err) => { fail: (err) => {
dd.alert({ dd.alert({
...@@ -94,10 +93,22 @@ Page({ ...@@ -94,10 +93,22 @@ Page({
} }
}) })
}, },
nextPage() { nextPage(event) {
switch (event.target.dataset.nextPage) {
case 'participants':
dd.navigateTo({ url: `./../attendingSituation/attendingSituation?userList=${JSON.stringify(this.data.userList)}` }) dd.navigateTo({ url: `./../attendingSituation/attendingSituation?userList=${JSON.stringify(this.data.userList)}` })
break;
case 'edit':
dd.navigateTo({ url: `./../createOrEditSchedule/createOrEditSchedule?id='${this.data.id}'` })
break;
}
}, },
preview(fileId, fileSize, fileType, fileName) { preview(fileId, fileSize, fileType, fileName) {
console.log(2222)
console.log(fileId)
console.log(fileSize)
console.log(fileType)
console.log(fileName)
dd.previewFileInDingTalk({ dd.previewFileInDingTalk({
corpId: dd.corpId, corpId: dd.corpId,
spaceId: this.data.previewSpaceId, spaceId: this.data.previewSpaceId,
......
...@@ -4,7 +4,8 @@ class Store { ...@@ -4,7 +4,8 @@ class Store {
locationName: '', locationName: '',
conflictPeople: [], conflictPeople: [],
participatorUserId: [], // 参会人的userId participatorUserId: [], // 参会人的userId
userList: [] userList: [],
editList: [{ icon: 'icondingwei', text: '地点' }, { icon: 'iconhuiqiantixing', text: '提醒' }, { icon: 'iconchongfu', text: '重复' }, { icon: 'icondidianmiaoshu', text: '描述' }, { icon: 'iconshanchu', text: '删除' }]
} }
} }
......
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