Commit d067a453 by liang ce

会议室列表更新

parent 730a8867
...@@ -97,95 +97,7 @@ ...@@ -97,95 +97,7 @@
</block> </block>
</scroll-view> </scroll-view>
<popup show="{{show}}" onClose="closePop" position="left"> <popup show="{{show}}" onClose="closePop" position="left">
<view class="sidebarContent" catchTap="preventSort"> <sidebar></sidebar>
<view class="sidebarLogo">
<view>
<image a:if="{{userMsg.headUrl}}" mode="scaleToFill" src="{{userMsg.headUrl}}" />
<text a:else>{{ userMsg.userName.slice(-1) }}</text>
</view>
<view>
{{ userMsg.userName }}
</view>
</view>
<view class="hasAssociated">
<view class="associated">
已关联应用
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
</view>
<view class="unAssociated">
<view class="associated">
可关联应用
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
</view>
</view>
</popup> </popup>
</view> </view>
<template is="loading" a:else> <template is="loading" a:else>
......
...@@ -29,12 +29,7 @@ create.Component({ ...@@ -29,12 +29,7 @@ create.Component({
props: {}, props: {},
didMount() { didMount() {
this.getDate(); this.getDate();
this.setData({
userMsg: {
headUrl: getApp().globalData.avatar || "",
userName: getApp().globalData.name
}
});
this.$store.locationSchedule = () => { this.$store.locationSchedule = () => {
this.locationScheduleList(); this.locationScheduleList();
}; };
......
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"popup": "../../components/popup/index" "popup": "../../components/popup/index",
"sidebar": "../../components/sidebar/sidebar"
} }
} }
\ No newline at end of file
import { login } from "./login";
export default function http(data) {
if (getApp().globalData.token !== "") {
return new Promise((resolve, rejects) => {
dd.httpRequest({
headers: {
"Content-Type": "application/json;charset=UTF-8",
Authorization: `Bearer ${getApp().globalData.token}`
},
url: `${data.url}`,
method: data.method,
dataType: "json",
data: data.data,
success: function(res) {
if (res.data.code == 0) {
resolve(res);
} else {
dd.alert({
content: "网络异常",
buttonText: "确定"
});
}
},
fail: function(res) {
dd.alert({
content: "网络异常",
buttonText: "确定"
});
rejects(res);
}
});
});
} else {
return new Promise((resolve, rejects) => {
login().then(res => {
const { oapiUser } = res.data.data;
getApp().globalData.token = res.data.data.accessToken.access_token;
getApp().globalData.name = res.data.data.oapiUser.name;
getApp().globalData.userid = res.data.data.oapiUser.userid;
getApp().globalData.avatar = res.data.data.oapiUser.avatar;
getApp().globalData.userInfo = JSON.stringify({
username: oapiUser.name,
userId: oapiUser.userid,
headUrl: oapiUser.avatar,
platform: "dingtalk"
});
dd.httpRequest({
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${getApp().globalData.token}`
},
url: `${data.url}`,
method: data.method,
data: data.data,
dataType: "json",
success: function(res) {
resolve(res);
},
fail: function(res) {
rejects(res);
}
});
});
});
}
}
const app = getApp() const app = getApp();
import $http from './http' import $http from "./http";
import $binding from "./binding";
// 获取创建会议室的会议室列表 // 获取创建会议室的会议室列表
export function getMeetingRoom(data) { export function getMeetingRoom(data) {
return $http({ return $http({
method: 'get', method: "get",
data: data, data: data,
url: '/meet/meeting-room/page', url: "/meet/meeting-room/page"
}) });
} }
// 获取会议室分类 // 获取会议室分类
...@@ -18,109 +19,109 @@ export function getMeetingRoom(data) { ...@@ -18,109 +19,109 @@ export function getMeetingRoom(data) {
// OFFICE_CATEGORY(2,"meeting_room_category") // OFFICE_CATEGORY(2,"meeting_room_category")
export function getLabelTree(data) { export function getLabelTree(data) {
return $http({ return $http({
method: 'get', method: "get",
data: data, data: data,
url: '/admin/label/tree', url: "/admin/label/tree"
}) });
} }
// 更新办公区域,设施,分类 // 更新办公区域,设施,分类
export function getMettingRoomLabelUpdate(data) { export function getMettingRoomLabelUpdate(data) {
return $http({ return $http({
method: 'POST', method: "POST",
data: JSON.stringify(data), data: JSON.stringify(data),
url: '/admin/label/update', url: "/admin/label/update"
}) });
} }
// 添加办公区域、会议室分类、会议室设置 // 添加办公区域、会议室分类、会议室设置
export function getMettingRoomLabelSave(data) { export function getMettingRoomLabelSave(data) {
return $http({ return $http({
method: 'POST', method: "POST",
data: JSON.stringify(data), data: JSON.stringify(data),
url: '/admin/label/save', url: "/admin/label/save"
}) });
} }
// 删除办公区域、会议室分类、会议室设置 // 删除办公区域、会议室分类、会议室设置
export function getMettingRoomLabelRemove(data) { export function getMettingRoomLabelRemove(data) {
return $http({ return $http({
method: 'get', method: "get",
data: data, data: data,
url: `/admin/label/remove/${data}`, url: `/admin/label/remove/${data}`
}) });
} }
// 删除会议室 // 删除会议室
export function getRemoveMeetingRoom(data) { export function getRemoveMeetingRoom(data) {
return $http({ return $http({
method: 'get', method: "get",
data: '', data: "",
url: `/meet/meeting-room/remove/${data}`, url: `/meet/meeting-room/remove/${data}`
}) });
} }
// 创建会议室 // 创建会议室
export function saveMettingRoom(data) { export function saveMettingRoom(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: '/meet/meeting-room/save', url: "/meet/meeting-room/save"
}) });
} }
// 修改会议室 // 修改会议室
export function mettingRoomUpdate(data) { export function mettingRoomUpdate(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: '/meet/meeting-room/update', url: "/meet/meeting-room/update"
}) });
} }
// 获取会议室详情 // 获取会议室详情
export function getMeetingRoomVOByUuid(data) { export function getMeetingRoomVOByUuid(data) {
return $http({ return $http({
method: 'get', method: "get",
data: '', data: "",
url: `/meet/meeting-room/getMeetingRoomVOByUuid/${data}`, url: `/meet/meeting-room/getMeetingRoomVOByUuid/${data}`
}) });
} }
// 获取我的会议 // 获取我的会议
export function myMeetingPage(data) { export function myMeetingPage(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: '/meet/meeting/myPage', url: "/meet/meeting/myPage"
}) });
} }
// 获取预定会议室列表 // 获取预定会议室列表
export function getReserveRoomList(data) { export function getReserveRoomList(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: '/meet/meeting-room/queryMeetingRoomAndOccupyTimeSlot', url: "/meet/meeting-room/queryMeetingRoomAndOccupyTimeSlot"
}) });
} }
// 获取预定会议详情 // 获取预定会议详情
export function getMyMeetingDetails(data) { export function getMyMeetingDetails(data) {
return $http({ return $http({
method: 'get', method: "get",
data: '', data: "",
url: `/meet/meeting/${data}`, url: `/meet/meeting/${data}`
}) });
} }
// 修改预定时间设置 // 修改预定时间设置
export function updateGlobalSetting(data) { export function updateGlobalSetting(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/meeting-global-setting/update` url: `/meet/meeting-global-setting/update`
}) });
} }
// 获取首页信息 // 获取首页信息
export function getHomeUserSchedule(data) { export function getHomeUserSchedule(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/schedule/getHomeUserSchedule` url: `/meet/schedule/getHomeUserSchedule`
}) });
} }
/* 创建日程全部请求 */ /* 创建日程全部请求 */
...@@ -128,168 +129,176 @@ export function getHomeUserSchedule(data) { ...@@ -128,168 +129,176 @@ export function getHomeUserSchedule(data) {
// 创建日程 // 创建日程
export function addSchedule(data) { export function addSchedule(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/schedule/addSchedule` url: `/meet/schedule/addSchedule`
}) });
} }
// 获取参会会人员的日程 // 获取参会会人员的日程
export function getUserScheduleInTime(data) { export function getUserScheduleInTime(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/schedule/getUserScheduleInTime` url: `/meet/schedule/getUserScheduleInTime`
}) });
} }
// 获取日程详情 // 获取日程详情
export function getScheduleDetail(data) { export function getScheduleDetail(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/schedule/getScheduleDetail` url: `/meet/schedule/getScheduleDetail`
}) });
} }
// 文件上传 // 文件上传
export function uploadPermissions(data) { export function uploadPermissions(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace` url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace`
}) });
} }
// 文件预览 // 文件预览
export function previewPermissions(data) { export function previewPermissions(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace` url: `/admin/ddOpenApi/getCustomSpaceAndGrantCustomSpace`
}) });
} }
// 编辑日程 // 编辑日程
export function modifySchedule(data) { export function modifySchedule(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/schedule/modifySchedule` url: `/meet/schedule/modifySchedule`
}) });
} }
// 删除日程 // 删除日程
export function deleteSchedule(data) { export function deleteSchedule(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/schedule/deleteSchedule` url: `/meet/schedule/deleteSchedule`
}) });
} }
// 可用会议室列表 // 可用会议室列表
export function queryAvailableMeetingRoomByTime(data) { export function queryAvailableMeetingRoomByTime(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/meeting-room/queryAvailableMeetingRoomByTime` url: `/meet/meeting-room/queryAvailableMeetingRoomByTime`
}) });
} }
// 跨天会议判断是否可点击 // 跨天会议判断是否可点击
export function getAllScheduleWithMeetingRoomByTime(data) { export function getAllScheduleWithMeetingRoomByTime(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/meeting-room/getAllScheduleWithMeetingRoomByTime` url: `/meet/meeting-room/getAllScheduleWithMeetingRoomByTime`
}) });
} }
// 获取动态展示 // 获取动态展示
export function getDynamic(data) { export function getDynamic(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/meeting-log/list` url: `/meet/meeting-log/list`
}) });
} }
// 获取动态展示 // 获取动态展示
export function saveFileInfo(data) { export function saveFileInfo(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/meeting-log-resource/save` url: `/meet/meeting-log-resource/save`
}) });
} }
// 删除文件 // 删除文件
export function delFile(data) { export function delFile(data) {
return $http({ return $http({
method: 'get', method: "get",
url: `/meet/schedule-accessory/remove/${data}` url: `/meet/schedule-accessory/remove/${data}`
}) });
} }
// 编辑文件 // 编辑文件
export function editFile(data) { export function editFile(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/schedule-accessory/update` url: `/meet/schedule-accessory/update`
}) });
} }
// 参加 不参加 // 参加 不参加
export function isParticipate(data) { export function isParticipate(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/schedule/confirm` url: `/meet/schedule/confirm`
}) });
} }
//会议室详情的获取动态列表 //会议室详情的获取动态列表
export function getMeetingRoomAffairs(id) { export function getMeetingRoomAffairs(id) {
return $http({ return $http({
method: 'get', method: "get",
url: `/meet/meeting-log/detail/${id}` url: `/meet/meeting-log/detail/${id}`
}) });
} }
//会议室创建新任务 //会议室创建新任务
export function createMeetingTask(data) { export function createMeetingTask(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/meeting-log-resource/save` url: `/meet/meeting-log-resource/save`
}) });
} }
//会议室修改任务 //会议室修改任务
export function updateMeetingTask(data) { export function updateMeetingTask(data) {
return $http({ return $http({
method: 'post', method: "post",
data: JSON.stringify(data), data: JSON.stringify(data),
url: `/meet/meeting-log-resource/update` url: `/meet/meeting-log-resource/update`
}) });
} }
//删除任务 //删除任务
export function deleteMeetingTask(id) { export function deleteMeetingTask(id) {
return $http({ return $http({
method: 'get', method: "get",
url: `/meet/meeting-log-resource/remove/${id}` url: `/meet/meeting-log-resource/remove/${id}`
}) });
} }
// 测试的首页api // 测试的首页api
export function getHomeUserSchedule1(data) { export function getHomeUserSchedule1(data) {
return $http({ return $http({
method: 'POST', method: "POST",
data: JSON.stringify(data), data: JSON.stringify(data),
url: '/meet/schedule/getHomeUserSchedule1', url: "/meet/schedule/getHomeUserSchedule1"
}) });
} }
// 动态list // 动态list
export function getDynamicList(data) { export function getDynamicList(data) {
return $http({ return $http({
method: 'get', method: "get",
data: data, data: data,
url: `/meet/meeting-log/page` url: `/meet/meeting-log/page`
}) });
} }
// 我的动态会议置顶 // 我的动态会议置顶
export function meetingCollection(data) { export function meetingCollection(data) {
return $http({ return $http({
method: 'POST', method: "POST",
data: JSON.stringify(data), data: JSON.stringify(data),
url: '/meet/schedule/collection', url: "/meet/schedule/collection"
}) });
}
// 获取outlook页面授权地址
export function getOutlookUrl(data) {
return $binding({
method: "POST",
data: "",
url: `https://third-authentication-beta.mingwork.com/microsoft/getThirdLoginUrl?state=${data}`
});
} }
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/meetingRoomList/meetingRoomList", "pages/meetingRoomList/meetingRoomList",
"pages/bindingOutlook/bindingOutlook",
"pages/scheduleList/scheduleList", "pages/scheduleList/scheduleList",
"pages/scheduleList/scheduleList", "pages/scheduleList/scheduleList",
"pages/meetingDetail/meetingDetail", "pages/meetingDetail/meetingDetail",
......
.sidebarContent {
background: #FFFFFF;
width: 640rpx;
height: 100%;
padding: 32rpx 0 32rpx 32rpx;
}
.sidebarLogo {
margin-bottom: 18rpx;
line-height: 64rpx;
font-size: 26rpx;
color: rgba(27, 38, 61, .56);
display: flex;
}
.sidebarLogo view:nth-of-type(1) {
margin-right: 34rpx;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: #3070F2;
color: white;
overflow: hidden;
}
.sidebarLogo view:nth-of-type(1) image {
width: 64rpx;
height: 64rpx;
}
.hasAssociated, .unAssociated {
margin-top: 48rpx;
}
.associated {
font-size: 24rpx;
color: rgba(25, 31, 37, .56);
line-height: 34px;
margin-bottom: 16rpx;
}
.applicationList {
height: 104rpx;
display: flex;
align-items: center;
}
.applicationLogo {
width: 72rpx;
height: 72rpx;
margin-right: 24rpx;
}
.applicationMsg {
flex: 1;
display: flex;
border-bottom: 1px solid rgba(241, 243, 249, 1);
height: 104rpx;
align-items: center;
padding-right: 32rpx;
}
.applicationMsg>view:nth-of-type(1) {
flex: 1;
}
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(1) {
font-size: 28rpx;
color: #191F25;
margin-bottom: 8rpx;
}
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(2) {
opacity: 0.56;
font-size: 20rpx;
color: #191F25;
}
.operateIcon {
width: 32rpx;
height: 32rpx;
}
.operateIcon .iconright {
font-size: 22rpx;
color: rgba(27, 38, 61, .5)
}
<view class="sidebarContent" catchTap="preventSort">
<view class="sidebarLogo">
<view>
<image a:if="{{userMsg.headUrl}}" mode="scaleToFill" src="{{userMsg.headUrl}}" />
<text a:else>{{ userMsg.userName.slice(-1) }}</text>
</view>
<view>
{{ userMsg.userName }}
</view>
</view>
<view class="hasAssociated">
<view class="associated">
已关联应用
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon" catchTap="toAccountDetails">
<text class="iconfont icon_setting1"></text>
</view>
</view>
</view>
</view>
<view class="unAssociated">
<view class="associated">
可关联应用
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg" catchTap="">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
Component({
mixins: [],
data: {
userMsg: null
},
props: {},
didMount() {
this.setData({
userMsg: {
headUrl: getApp().globalData.avatar || "",
userName: getApp().globalData.name
}
});
},
didUpdate() {},
didUnmount() {},
methods: {}
});
{
"component": true
}
\ No newline at end of file
<web-view id="web-view-1" src="{{url}}" onMessage="test"></web-view>
\ No newline at end of file
import { getOutlookUrl } from "../../api/request";
Page({
data: {
url: ''
},
onLoad() {
setTimeout(() => {
let data = `0968162722860917,${dd.corpId}`;
getOutlookUrl(data).then(res => {
this.setData({
url: res.data.data
})
}, 2000);
});
}
});
{}
\ No newline at end of file
/* 预定会议列表 */ /* 预定会议列表 */
.searchHeader { .searchHeader {
box-sizing: border-box;
background: #fff; background: #fff;
width: 100%; width: 100%;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
z-index: 99; z-index: 99;
}
.searchHeader1 {
border-bottom: 1px solid rgba(25, 31, 37, 0.12); border-bottom: 1px solid rgba(25, 31, 37, 0.12);
font-size: 26rpx; font-size: 26rpx;
letter-spacing: -0.31rpx; letter-spacing: -0.31rpx;
height: 96rpx; height: 96rpx;
box-sizing: border-box;
padding: 0 32rpx; padding: 0 32rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -26,34 +21,23 @@ ...@@ -26,34 +21,23 @@
justify-content: flex-end; justify-content: flex-end;
} }
.searchHeader2 {
width: 750rpx;
height: 96rpx;
overflow: hidden;
border-bottom: 1px solid rgba(25, 31, 37, 0.12);
box-sizing: border-box;
}
.searchTime { .searchTime {
width: 200rpx; display: flex;
height: 96rpx; height: 96rpx;
line-height: 96rpx; color: rgba(25, 31, 37, 1);
font-size: 26rpx; font-family: DINAlternate-Bold, DINAlternate;
} font-weight: bold;
align-items: center;
.searchTime>view:nth-of-type(1) { justify-content: center;
flex: 1;
font-size: 26rpx;
} }
.searchTime>view:nth-of-type(2) { .searchTime text {
margin: 0 10rpx 0 16rpx; margin-right: 8rpx;
color: rgba(25, 31, 37, 0.40); display: block;
} }
.xialakuangSize .iconxialakuang { .iconicon_open {
font-size: 24rpx !important; font-size: 32rpx;
color: rgba(25, 31, 37, 0.40);
} }
.reserveMeeting { .reserveMeeting {
...@@ -306,6 +290,7 @@ ...@@ -306,6 +290,7 @@
height: 100vh; height: 100vh;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
padding-top: 96rpx;
} }
.reserveRoomMsg .iconfont { .reserveRoomMsg .iconfont {
......
<view class="searchHeader"> <view class="searchHeader">
<view class="searchHeader1"> <view class="searchTime">
<view class="searchTime" onTap="selectSearchTime"> <view onTap="selectSearchTime">{{search.time.split('-')[0]}}年{{search.time.split('-')[1]}}月{{search.time.split('-')[2]}}日</view>
<view> <view class="iconfont iconicon_open"></view>
{{search.time.replace(/-/g,".")}}
</view>
<view class="xialakuangSize">
<text class="iconfont iconxialakuang"></text>
</view>
</view> </view>
</view> </view>
<scroll-view scroll-y="{{canScroll}}" class="roomScrollView"> <scroll-view scroll-y="{{canScroll}}" class="roomScrollView">
<view class="reserveMeeting"> <view class="reserveMeeting">
<view class="meetingRoomContent" a:for="{{reserveRoomList}}" data-roomid="{{item.meetingRoomId}}" data-roomname="{{item.meetingRoomFullName}}" onTap="changeRoomTime"> <view class="meetingRoomContent" a:for="{{reserveRoomList}}" data-roomid="{{item.meetingRoomId}}" data-roomname="{{item.meetingRoomFullName}}" onTap="changeRoomTime">
<view class="roomMessage"> <view class="roomMessage">
...@@ -55,8 +50,8 @@ ...@@ -55,8 +50,8 @@
<view class="noRoomTip">当前暂无会议室</view> <view class="noRoomTip">当前暂无会议室</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<popup show="{{isShowModal}}" onClose="onCancel" position="bottom"> <popup show="{{isShowModal}}" onClose="onCancel" position="bottom">
<view a:if="{{!isShowCalendar}}" class="modalContent"> <view a:if="{{!isShowCalendar}}" class="modalContent">
<view class="modalHeader"> <view class="modalHeader">
<text onTap="onDetermine">确定</text> <text onTap="onDetermine">确定</text>
...@@ -118,6 +113,4 @@ ...@@ -118,6 +113,4 @@
</view> </view>
<calendar type="single" haveYear="{{false}}" selectedDate="{{meetingTime.date}}" onSelect="handleSelect" onMonthChange="onMonthChange" onYearChange="onYearChange" onSelectHasDisableDate="onSelectHasDisableDate" /> <calendar type="single" haveYear="{{false}}" selectedDate="{{meetingTime.date}}" onSelect="handleSelect" onMonthChange="onMonthChange" onYearChange="onYearChange" onSelectHasDisableDate="onSelectHasDisableDate" />
</view> </view>
</popup> </popup>
<lable-tree a:if="{{isShowLableModal}}" areTreeList="{{lableTreeList}}" locationName="{{location.name}}" locationId="{{location.id}}" isShow="{{isShowLableModal}}" onPropsCS="onPropsCS"> \ No newline at end of file
</lable-tree>
\ No newline at end of file
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
getAllScheduleWithMeetingRoomByTime getAllScheduleWithMeetingRoomByTime
} from "../../api/request"; } from "../../api/request";
import { EEXIST } from "constants"; import { EEXIST } from "constants";
import { getFormatDate } from "../../utils/utils"; import { getFormatDate, padZero } from "../../utils/utils";
import create from "dd-store"; import create from "dd-store";
create.Page({ create.Page({
data: { data: {
...@@ -77,11 +77,13 @@ create.Page({ ...@@ -77,11 +77,13 @@ create.Page({
let date = new Date(this.$store.data.startTime.replace(/-/g, "/")); let date = new Date(this.$store.data.startTime.replace(/-/g, "/"));
// let date = new Date(); // let date = new Date();
let year = date.getFullYear(); let year = date.getFullYear();
let month = ("00" + (date.getMonth() + 1)).slice(-2); let month = padZero(date.getMonth() + 1);
let day = ("00" + date.getDate()).slice(-2); let day = padZero(date.getDate());
let hour = ("00" + date.getHours()).slice(-2); let hour = padZero(date.getHours());
let minute = ("00" + date.getMinutes()).slice(-2); let minute = padZero(date.getMinutes());
let todayTime = `${year}/${date.getMonth() + 1}/${date.getDate()}`; let todayTime = `${year}/${padZero(date.getMonth() + 1)}/${padZero(
date.getDate()
)}`;
let tomorrowTime = new Date(date); let tomorrowTime = new Date(date);
tomorrowTime.setDate(tomorrowTime.getDate() + 1); tomorrowTime.setDate(tomorrowTime.getDate() + 1);
let afterTomorrowTime = new Date(date); let afterTomorrowTime = new Date(date);
...@@ -89,10 +91,12 @@ create.Page({ ...@@ -89,10 +91,12 @@ create.Page({
this.setData({ this.setData({
"search.time": `${year}-${month}-${day}`, "search.time": `${year}-${month}-${day}`,
"TimeSlot.todayTime": todayTime, "TimeSlot.todayTime": todayTime,
"TimeSlot.tomorrowTime": `${year}/${tomorrowTime.getMonth() + "TimeSlot.tomorrowTime": `${year}/${padZero(
1}/${tomorrowTime.getDate()}`, tomorrowTime.getMonth() + 1
"TimeSlot.afterTomorrowTime": `${year}/${afterTomorrowTime.getMonth() + )}/${padZero(tomorrowTime.getDate())}`,
1}/${afterTomorrowTime.getDate()}` "TimeSlot.afterTomorrowTime": `${year}/${padZero(
afterTomorrowTime.getMonth() + 1
)}/${padZero(afterTomorrowTime.getDate())}`
}); });
this.getPageData(); this.getPageData();
}, },
...@@ -172,15 +176,30 @@ create.Page({ ...@@ -172,15 +176,30 @@ create.Page({
: modalDate.getHours() + 1 < 10 : modalDate.getHours() + 1 < 10
? "0" + (modalDate.getHours() + 1) ? "0" + (modalDate.getHours() + 1)
: modalDate.getHours() + 1; : modalDate.getHours() + 1;
let num = "";
if (dateTime.replace(/-/g, "/") === this.data.TimeSlot.todayTime) {
num = "0";
} else if (
dateTime.replace(/-/g, "/") === this.data.TimeSlot.tomorrowTime
) {
num = "1";
} else if (
dateTime.replace(/-/g, "/") === this.data.TimeSlot.afterTomorrowTime
) {
num = "2";
} else {
num = "3";
}
this.setData({
"meetingTime.date": dateTime.replace(/-/g, "/"),
"meetingTime.meetingRoomId": e.currentTarget.dataset.roomid,
"meetingTime.meetingRoomName": e.currentTarget.dataset.roomname,
dataNum: num
});
let data = { let data = {
meetingRoomId: roomId, meetingRoomId: roomId,
startTime: dateTime startTime: dateTime
}; };
this.setData({
"meetingTime.date": dateTime,
"meetingTime.meetingRoomId": e.currentTarget.dataset.roomid,
"meetingTime.meetingRoomName": e.currentTarget.dataset.roomname
});
getReserveRoomList(data).then(res => { getReserveRoomList(data).then(res => {
let modalList = res.data.data[0].timeSlotWithMeetingVOS.map(item => { let modalList = res.data.data[0].timeSlotWithMeetingVOS.map(item => {
// 判断是否过期 // 判断是否过期
...@@ -203,12 +222,19 @@ create.Page({ ...@@ -203,12 +222,19 @@ create.Page({
}; };
} }
}); });
that.setData(
{
toThisTime: ""
},
() => {
that.setData({ that.setData({
modalList: modalList, modalList: modalList,
isShowModal: true, isShowModal: true,
canScroll: false, canScroll: false,
toThisTime: `${modalHour}:${modalMins < 30 ? "30" : "00"}` toThisTime: `${modalHour}:${modalMins < 30 ? "30" : "00"}`
}); });
}
);
}); });
}, },
// 修改弹框checkBox // 修改弹框checkBox
...@@ -1234,7 +1260,9 @@ create.Page({ ...@@ -1234,7 +1260,9 @@ create.Page({
}); });
}, },
handleSelect(e) { handleSelect(e) {
let date = `${e[0].getFullYear()}/${e[0].getMonth() + 1}/${e[0].getDate()}`; let date = `${e[0].getFullYear()}/${padZero(e[0].getMonth() + 1)}/${padZero(
e[0].getDate()
)}`;
let num = ""; let num = "";
if (date === this.data.TimeSlot.todayTime) { if (date === this.data.TimeSlot.todayTime) {
num = "0"; num = "0";
......
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