描述:细节修改

This commit is contained in:
SelfRidicule 2024-03-04 14:38:21 +08:00
parent b1aab0e5fa
commit f07aea5c64
12 changed files with 213 additions and 40 deletions

View File

@ -26,4 +26,12 @@ export function meetingRoomDetailRq(id) {
url: '/api/roomContent/info/' + id,
method: "get",
});
}
// 当前会议室已预约的记录
export function meetingRoomBookedRecordRq(id) {
return request({
url: '/api/roomContent/getMeetingRoomRecord/' + id,
method: "get",
});
}

View File

@ -3,8 +3,8 @@ App({
// 本地测试时不用加/api
DOMAIN_NAME: 'http://192.168.0.11:9227', //接口域名
IMG_NAME: 'http://192.168.0.11:9227',
// DOMAIN_NAME: 'https://demo.metasoft.vip/api',
// IMG_NAME: 'https://demo.metasoft.vip/api',
// DOMAIN_NAME: 'http://222.184.49.22:80', //接口域名
// IMG_NAME: 'http://222.184.49.22:80',
globals: {
refreshMyPages: false,
homedata: {},

View File

@ -90,15 +90,21 @@ Page({
path: "/pages/meeting/meetingReservation/meetingReservation"
},
{
name: "预约记录",
img: "/profile/static/index/menu-yyjl.png",
path: "/pages/meeting/reservationRecord/reservationRecord"
name: "展厅预约",
img: "/profile/static/index/menu-ztyy.png",
path: ""
},
{
name: "访客预约",
img: "/profile/static/index/menu-fkyy.png",
path: "/pages/meeting/visitorIinvitation/visitorIinvitation"
},
{
name: "预约记录",
img: "/profile/static/index/menu-yyjl.png",
path: "/pages/meeting/reservationRecord/reservationRecord"
},
{
name: "远程门禁",
img: "/profile/static/index/menu-ycmj.png",
@ -129,11 +135,7 @@ Page({
img: "/profile/static/index/menu-rzsq.png",
path: "/pages/applyType/applyType"
},
{
name: "展厅预约",
img: "/profile/static/index/menu-ztyy.png",
path: ""
},
],
bannerList: [{
bg: '/profile/static/index/banner/1.jpg',

View File

@ -1,3 +1,3 @@
{
"navigationBarTitleText": "首页"
"navigationBarTitleText": "中电郑州数据创新中心"
}

View File

@ -1,35 +1,102 @@
const app = getApp()
import {
meetingRoomBookedRecordRq
} from "../../../../api/meeting/meetingRoom.js"
Page({
/**
* 页面的初始数据
*/
data: {
minHour: 10,
maxHour: 20,
minDate: new Date().getTime(),
maxDate: new Date(2029, 10, 1).getTime(),
currentDate: new Date().getTime(),
meetingRoomId: null,
minTime: new Date().getTime(),
maxTime: null,
endMaxTime: null,
startTime: new Date().getTime(),
endTime: null,
showTime: false,
dataList: [],
},
onInput(event) {
// 选择-开始时间
onInputStartTime(event) {
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() {
wx.navigateTo({
url: "/pages/meeting/meetingRoom/meetingOrder/meetingOrder",
// 预约时间
reservationTime() {
this.setData({
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) {
console.log('onLoad', options);
// 获取传递参数
this.setData({
...options
})
// 初始化时间
this.initParamTime()
},
/**
@ -43,7 +110,24 @@ Page({
* 生命周期函数--监听页面显示
*/
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
})
})
},
/**

View File

@ -1,7 +1,7 @@
{
"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": "会议室已预约"
}

View File

@ -1,16 +1,30 @@
<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 File

@ -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 {
box-sizing: border-box;
position: absolute;
@ -11,4 +49,14 @@
color: white;
font-size: 30rpx;
text-align: center;
}
.selfPop{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: #ffffff;
transition: 1s all;
}

View File

@ -25,7 +25,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log('onLoad', options);
// 获取传递参数
this.setData({
...options
})
},
// 跳转-空间设施

View File

@ -53,15 +53,17 @@ Page({
// 跳转空间设施
jumpMeetingFacilities() {
let meetingRoomId = this.data.meetingRoomId;
wx.navigateTo({
url: '/pages/meeting/meetingRoom/meetingFacilities/meetingFacilities',
url: '/pages/meeting/meetingRoom/meetingFacilities/meetingFacilities?meetingRoomId=' + meetingRoomId,
})
},
// 跳转-会议室已预约
jumpMeetingBooked() {
let meetingRoomId = this.data.meetingRoomId;
wx.navigateTo({
url: "/pages/meeting/meetingRoom/meetingBooked/meetingBooked",
url: "/pages/meeting/meetingRoom/meetingBooked/meetingBooked?meetingRoomId=" + meetingRoomId,
})
},

View File

@ -22,6 +22,10 @@
<view class="name">办公面积</view>
<view class="value">{{detail.area}}m</view>
</view>
<view class="typeItem">
<view class="name">形式</view>
<view class="value">{{detail.shape}}</view>
</view>
</view>
<!-- 文字内容 -->

View File

@ -6,6 +6,13 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/meeting/meetingRoom/meetingBooked/meetingBooked",
"pathName": "pages/meeting/meetingRoom/meetingBooked/meetingBooked",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/meeting/meetingRoom/meetingBooked/meetingBooked",
"pathName": "pages/meeting/meetingRoom/meetingBooked/meetingBooked",