mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 14:19:38 +08:00
描述:细节修改
This commit is contained in:
parent
b1aab0e5fa
commit
f07aea5c64
@ -26,4 +26,12 @@ export function meetingRoomDetailRq(id) {
|
|||||||
url: '/api/roomContent/info/' + id,
|
url: '/api/roomContent/info/' + id,
|
||||||
method: "get",
|
method: "get",
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 当前会议室已预约的记录
|
||||||
|
export function meetingRoomBookedRecordRq(id) {
|
||||||
|
return request({
|
||||||
|
url: '/api/roomContent/getMeetingRoomRecord/' + id,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
}
|
}
|
@ -3,8 +3,8 @@ App({
|
|||||||
// 本地测试时不用加/api
|
// 本地测试时不用加/api
|
||||||
DOMAIN_NAME: 'http://192.168.0.11:9227', //接口域名
|
DOMAIN_NAME: 'http://192.168.0.11:9227', //接口域名
|
||||||
IMG_NAME: 'http://192.168.0.11:9227',
|
IMG_NAME: 'http://192.168.0.11:9227',
|
||||||
// DOMAIN_NAME: 'https://demo.metasoft.vip/api',
|
// DOMAIN_NAME: 'http://222.184.49.22:80', //接口域名
|
||||||
// IMG_NAME: 'https://demo.metasoft.vip/api',
|
// IMG_NAME: 'http://222.184.49.22:80',
|
||||||
globals: {
|
globals: {
|
||||||
refreshMyPages: false,
|
refreshMyPages: false,
|
||||||
homedata: {},
|
homedata: {},
|
||||||
|
@ -90,15 +90,21 @@ Page({
|
|||||||
path: "/pages/meeting/meetingReservation/meetingReservation"
|
path: "/pages/meeting/meetingReservation/meetingReservation"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "预约记录",
|
name: "展厅预约",
|
||||||
img: "/profile/static/index/menu-yyjl.png",
|
img: "/profile/static/index/menu-ztyy.png",
|
||||||
path: "/pages/meeting/reservationRecord/reservationRecord"
|
path: ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "访客预约",
|
name: "访客预约",
|
||||||
img: "/profile/static/index/menu-fkyy.png",
|
img: "/profile/static/index/menu-fkyy.png",
|
||||||
path: "/pages/meeting/visitorIinvitation/visitorIinvitation"
|
path: "/pages/meeting/visitorIinvitation/visitorIinvitation"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "预约记录",
|
||||||
|
img: "/profile/static/index/menu-yyjl.png",
|
||||||
|
path: "/pages/meeting/reservationRecord/reservationRecord"
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "远程门禁",
|
name: "远程门禁",
|
||||||
img: "/profile/static/index/menu-ycmj.png",
|
img: "/profile/static/index/menu-ycmj.png",
|
||||||
@ -129,11 +135,7 @@ Page({
|
|||||||
img: "/profile/static/index/menu-rzsq.png",
|
img: "/profile/static/index/menu-rzsq.png",
|
||||||
path: "/pages/applyType/applyType"
|
path: "/pages/applyType/applyType"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "展厅预约",
|
|
||||||
img: "/profile/static/index/menu-ztyy.png",
|
|
||||||
path: ""
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
bannerList: [{
|
bannerList: [{
|
||||||
bg: '/profile/static/index/banner/1.jpg',
|
bg: '/profile/static/index/banner/1.jpg',
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText": "首页"
|
"navigationBarTitleText": "中电郑州数据创新中心"
|
||||||
}
|
}
|
@ -1,35 +1,102 @@
|
|||||||
|
const app = getApp()
|
||||||
|
import {
|
||||||
|
meetingRoomBookedRecordRq
|
||||||
|
} from "../../../../api/meeting/meetingRoom.js"
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
minHour: 10,
|
meetingRoomId: null,
|
||||||
maxHour: 20,
|
minTime: new Date().getTime(),
|
||||||
minDate: new Date().getTime(),
|
maxTime: null,
|
||||||
maxDate: new Date(2029, 10, 1).getTime(),
|
endMaxTime: null,
|
||||||
currentDate: new Date().getTime(),
|
startTime: new Date().getTime(),
|
||||||
|
endTime: null,
|
||||||
|
showTime: false,
|
||||||
|
dataList: [],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 选择-开始时间
|
||||||
onInput(event) {
|
onInputStartTime(event) {
|
||||||
this.setData({
|
this.setData({
|
||||||
currentDate: event.detail,
|
startTime: event.detail,
|
||||||
|
});
|
||||||
|
this.setEndMaxTime(event.detail)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 选择-结束时间
|
||||||
|
onInputEndTime(event) {
|
||||||
|
let _this = this;
|
||||||
|
this.setData({
|
||||||
|
endTime: _this.addSeconds(event.detail , 59),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 跳转完成
|
// 预约时间
|
||||||
jumpComplete() {
|
reservationTime() {
|
||||||
wx.navigateTo({
|
this.setData({
|
||||||
url: "/pages/meeting/meetingRoom/meetingOrder/meetingOrder",
|
showTime: true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 确认时间
|
||||||
|
confirmTime() {
|
||||||
|
let meetingRoomId = this.data.meetingRoomId;
|
||||||
|
let startTime = this.data.startTime;
|
||||||
|
let endTime = this.data.endTime;
|
||||||
|
let paramUrl = "?meetingRoomId=" + meetingRoomId + "&startTime=" + startTime + "&endTime=" + endTime;
|
||||||
|
wx.navigateTo({
|
||||||
|
url: "/pages/meeting/meetingRoom/meetingOrder/meetingOrder" + paramUrl,
|
||||||
|
})
|
||||||
|
this.setData({
|
||||||
|
showTime: false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 取消时间
|
||||||
|
cancelTime() {
|
||||||
|
this.setData({
|
||||||
|
showTime: false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 初始化时间
|
||||||
|
initParamTime() {
|
||||||
|
let maxTime = new Date();
|
||||||
|
maxTime.setFullYear(maxTime.getFullYear() + 3)
|
||||||
|
this.setData({
|
||||||
|
maxTime: maxTime.getTime()
|
||||||
|
})
|
||||||
|
this.setEndMaxTime(this.data.startTime)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 指定天的最后一秒
|
||||||
|
setEndMaxTime(time) {
|
||||||
|
let endMaxTime = new Date(new Date(time).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1;
|
||||||
|
this.setData({
|
||||||
|
endMaxTime: endMaxTime
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 添加指定秒数
|
||||||
|
addSeconds(time , seconds) {
|
||||||
|
return new Date(time.setSeconds(time.getSeconds() + seconds)).getTime();
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
console.log('onLoad', options);
|
||||||
|
// 获取传递参数
|
||||||
|
this.setData({
|
||||||
|
...options
|
||||||
|
})
|
||||||
|
// 初始化时间
|
||||||
|
this.initParamTime()
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -43,7 +110,24 @@ Page({
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow() {
|
onShow() {
|
||||||
console.log('onShow' , 111);
|
console.log('onShow', 111);
|
||||||
|
let _this = this;
|
||||||
|
meetingRoomBookedRecordRq(this.data.meetingRoomId).then(res => {
|
||||||
|
console.log('meetingRoomBookedRecordRq', res);
|
||||||
|
let dataList = res.data;
|
||||||
|
dataList.map(item => {
|
||||||
|
item.nowDate = item.nowDate.substring(0, 10);
|
||||||
|
item.reservations = item.reservations.map(record => {
|
||||||
|
record.startTime = record.startTime.substring(11)
|
||||||
|
record.endDate = record.endDate.substring(11)
|
||||||
|
return record;
|
||||||
|
})
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
_this.setData({
|
||||||
|
dataList
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"van-picker": "@vant/weapp/picker/index",
|
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
|
||||||
"van-datetime-picker": "@vant/weapp/datetime-picker/index"
|
"van-popup": "@vant/weapp/popup/index"
|
||||||
},
|
},
|
||||||
"navigationBarTitleText": "会议室已预约"
|
"navigationBarTitleText": "会议室已预约"
|
||||||
}
|
}
|
@ -1,16 +1,30 @@
|
|||||||
<view class="containerView public">
|
<view class="containerView public">
|
||||||
|
|
||||||
|
<view class="dataView">
|
||||||
|
<!-- 标题 -->
|
||||||
|
<view class="leftLineTitle">会议预约情况</view>
|
||||||
|
<!-- 预约列表 -->
|
||||||
|
<view class="itemVIew" wx:for="{{dataList}}" wx:for-item="item" wx:key="*this">
|
||||||
|
<view class="item">{{item.nowDate}}</view>
|
||||||
|
<view class="itemTimeView" wx:for="{{item.reservations}}" wx:for-item="record" wx:key="*this">
|
||||||
|
<view class="time">{{record.startTime}}~{{record.endDate}}</view>
|
||||||
|
<view class="status">{{record.statusName}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 预约时间 -->
|
<!-- 预约时间 -->
|
||||||
<view class="submitBtn" bind:tap="jumpComplete">预约时间</view>
|
<view class="submitBtn" bind:tap="reservationTime">预约时间</view>
|
||||||
|
|
||||||
|
<!-- 选择时间 -->
|
||||||
|
<view class="selfPop" wx:if="{{showTime}}">
|
||||||
|
<van-datetime-picker title="请选择开始时间" type="datetime" value="{{ startTime }}" min-date="{{ minTime }}" max-date="{{ maxTime }}" bind:input="onInputStartTime" bind:confirm="confirmTime" bind:cancel="cancelTime"
|
||||||
|
confirm-button-text=""
|
||||||
|
cancel-button-text=""/>
|
||||||
|
|
||||||
|
<van-datetime-picker title="请选择结束时间" type="datetime" value="{{ endTime }}" min-date="{{ startTime }}" max-date="{{ endMaxTime }}" bind:input="onInputEndTime"
|
||||||
|
bind:confirm="confirmTime" bind:cancel="cancelTime"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 选择时间 -->
|
|
||||||
<van-datetime-picker
|
|
||||||
type="datetime"
|
|
||||||
value="{{ currentDate }}"
|
|
||||||
min-date="{{ minDate }}"
|
|
||||||
max-date="{{ maxDate }}"
|
|
||||||
bind:input="onInput"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
@ -1,3 +1,41 @@
|
|||||||
|
.containerView.public {
|
||||||
|
padding-bottom: 300rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataView {
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemVIew {
|
||||||
|
box-shadow: rgba(153,134,134,0.2) 0px 0px 4px 0px;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemVIew .item,
|
||||||
|
.itemVIew .itemTimeView {
|
||||||
|
padding: 30rpx 0;
|
||||||
|
background-image: linear-gradient(to right, rgb(126, 126, 126, 0.1), rgb(126, 126, 126, 0.1), transparent 100%);
|
||||||
|
background-size: 20rpx 2rpx;
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemVIew .item {
|
||||||
|
color: #f1bb6b;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemVIew .itemTimeView {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemVIew .itemTimeView .status {
|
||||||
|
color: #b3b3b3;
|
||||||
|
}
|
||||||
|
|
||||||
.submitBtn {
|
.submitBtn {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -11,4 +49,14 @@
|
|||||||
color: white;
|
color: white;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selfPop{
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
background: #ffffff;
|
||||||
|
transition: 1s all;
|
||||||
}
|
}
|
@ -25,7 +25,11 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
console.log('onLoad', options);
|
||||||
|
// 获取传递参数
|
||||||
|
this.setData({
|
||||||
|
...options
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 跳转-空间设施
|
// 跳转-空间设施
|
||||||
|
@ -53,15 +53,17 @@ Page({
|
|||||||
|
|
||||||
// 跳转空间设施
|
// 跳转空间设施
|
||||||
jumpMeetingFacilities() {
|
jumpMeetingFacilities() {
|
||||||
|
let meetingRoomId = this.data.meetingRoomId;
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/meeting/meetingRoom/meetingFacilities/meetingFacilities',
|
url: '/pages/meeting/meetingRoom/meetingFacilities/meetingFacilities?meetingRoomId=' + meetingRoomId,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 跳转-会议室已预约
|
// 跳转-会议室已预约
|
||||||
jumpMeetingBooked() {
|
jumpMeetingBooked() {
|
||||||
|
let meetingRoomId = this.data.meetingRoomId;
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: "/pages/meeting/meetingRoom/meetingBooked/meetingBooked",
|
url: "/pages/meeting/meetingRoom/meetingBooked/meetingBooked?meetingRoomId=" + meetingRoomId,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -22,6 +22,10 @@
|
|||||||
<view class="name">办公面积</view>
|
<view class="name">办公面积</view>
|
||||||
<view class="value">{{detail.area}}m</view>
|
<view class="value">{{detail.area}}m</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="typeItem">
|
||||||
|
<view class="name">形式</view>
|
||||||
|
<view class="value">{{detail.shape}}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 文字内容 -->
|
<!-- 文字内容 -->
|
||||||
|
@ -6,6 +6,13 @@
|
|||||||
"condition": {
|
"condition": {
|
||||||
"miniprogram": {
|
"miniprogram": {
|
||||||
"list": [
|
"list": [
|
||||||
|
{
|
||||||
|
"name": "pages/meeting/meetingRoom/meetingBooked/meetingBooked",
|
||||||
|
"pathName": "pages/meeting/meetingRoom/meetingBooked/meetingBooked",
|
||||||
|
"query": "",
|
||||||
|
"launchMode": "default",
|
||||||
|
"scene": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "pages/meeting/meetingRoom/meetingBooked/meetingBooked",
|
"name": "pages/meeting/meetingRoom/meetingBooked/meetingBooked",
|
||||||
"pathName": "pages/meeting/meetingRoom/meetingBooked/meetingBooked",
|
"pathName": "pages/meeting/meetingRoom/meetingBooked/meetingBooked",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user