mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 17:49:36 +08:00
部分改动
This commit is contained in:
parent
db53b4e4f7
commit
7c37fc1cf4
@ -45,9 +45,9 @@ Page({
|
||||
dataList: [],
|
||||
rangeOp: [],
|
||||
filterTime(type, options) {
|
||||
// if (type === 'minute') {
|
||||
// return options.filter((option) => option == '00');
|
||||
// }
|
||||
if (type === 'minute') {
|
||||
return options.filter((option) => option % 15 === 0);
|
||||
}
|
||||
return options;
|
||||
},
|
||||
},
|
||||
@ -331,7 +331,6 @@ Page({
|
||||
endMaxMinute: _endMaxMinute
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
|
@ -30,6 +30,10 @@
|
||||
<view style="width: 50%;text-align: center;">分</view>
|
||||
</view>
|
||||
<van-datetime-picker type="time" visible-item-count="4" value="{{ endTime }}" min-hour="{{ endMinTime }}" max-hour="{{ endMaxTime }}" min-minute="{{ endMinMinute }}" max-minute="{{ endMaxMinute }}" bind:change="onInputEndTime" confirm-button-text="" cancel-button-text="" show-toolbar="{{false}}" filter="{{ filterTime }}" />
|
||||
|
||||
</view>
|
||||
<view style="text-align: center;color: red; margin-top: 0px;line-height: 20px;z-index: 10;position: fixed;left: 50%;bottom: 130px;transform: translateX(-50%);">
|
||||
请正确填写会议开始时间
|
||||
</view>
|
||||
<view wx:if="{{ userDetail.roomRole != 5 }}" data-act="confirm" class="submitBtn" bind:tap="confirmTime">确认时间</view>
|
||||
<view wx:if="{{ userDetail.roomRole == 5 }}" data-act="confirm" class="submitBtn" style="width: 40%;left: 28%;" bind:tap="confirmTime">填写信息</view>
|
||||
|
@ -50,9 +50,14 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log('onLoad', options);
|
||||
let userData = wx.getStorageSync('user')
|
||||
if (userData.username == userData.mobile) {
|
||||
userData.username = ''
|
||||
}
|
||||
this.setData({
|
||||
...options,
|
||||
userData: wx.getStorageSync('user'),
|
||||
userData: userData,
|
||||
|
||||
// selectDay: selfFormatTimeYMD(options.startTime),
|
||||
// selectCountTime,
|
||||
})
|
||||
|
@ -12,7 +12,7 @@
|
||||
<!-- 详细信息 -->
|
||||
<view class="meetingDetailView">
|
||||
<view class="detailView">
|
||||
<view class="title">{{room.floor}} | {{room.roomNum}} | {{room.capacityNum}}人 | {{room.typeName}}</view>
|
||||
<view class="title">{{room.floor}} | {{room.roomNum}}会议室 | {{room.capacityNum}}人 | {{room.typeName}}</view>
|
||||
<view class="itemList">
|
||||
{{room.device}}
|
||||
</view>
|
||||
|
@ -10,7 +10,7 @@
|
||||
</view>
|
||||
<view class="meetingDetailView">
|
||||
<view class="detailView">
|
||||
<view class="title">{{detail.floor}} | {{detail.roomNum}} | {{detail.capacityNum}}人 | {{detail.typeName}}</view>
|
||||
<view class="title">{{detail.floor}} | {{detail.roomNum}}会议室 | {{detail.capacityNum}}人 | {{detail.typeName}}</view>
|
||||
<view class="itemList">
|
||||
{{detail.device}}
|
||||
<!-- <view class="item" wx:for="{{detail.roomItemList}}" wx:for-item="serviceItem" wx:key="*this">#{{serviceItem.name}}</view>
|
||||
|
@ -6,7 +6,8 @@ import Notify from '@vant/weapp/notify/notify';
|
||||
import {
|
||||
selfFormatTimeYMD,
|
||||
selfFormatTimeHM,
|
||||
getWeekday
|
||||
getWeekday,
|
||||
getNowDate
|
||||
} from "../../../../utils/util.js"
|
||||
|
||||
import {
|
||||
@ -38,7 +39,7 @@ Page({
|
||||
value: ''
|
||||
},
|
||||
status: {
|
||||
value: 5,
|
||||
value: 7,
|
||||
option: [{
|
||||
text: '全部预约',
|
||||
value: ''
|
||||
@ -72,7 +73,7 @@ Page({
|
||||
]
|
||||
},
|
||||
sort: {
|
||||
value: '',
|
||||
value: 'start',
|
||||
option: [{
|
||||
text: '排序方式',
|
||||
value: ''
|
||||
@ -314,6 +315,12 @@ Page({
|
||||
formartData(queryDataList) {
|
||||
// 格式化数据
|
||||
return queryDataList.map(item => {
|
||||
let isNowDay = false
|
||||
let nowDate = selfFormatTimeYMD(getNowDate())
|
||||
if (nowDate == selfFormatTimeYMD(item.start)) {
|
||||
isNowDay = true
|
||||
}
|
||||
item.isNowDay = isNowDay
|
||||
item.timeSlot = selfFormatTimeYMD(item.start) + ' '+ getWeekday(item.start) +' ' + selfFormatTimeHM(item.start) + '~' + selfFormatTimeHM(item.end);
|
||||
// 状态字体颜色
|
||||
let statusColor = "#FFB119";
|
||||
|
@ -15,7 +15,8 @@
|
||||
</van-dropdown-menu>
|
||||
<view class="itemView" wx:for="{{reservationDataList}}" wx:for-item="item" wx:key="*this">
|
||||
<view class="headView">
|
||||
<view class="number">{{item.timeSlot}}</view>
|
||||
<view wx:if="{{!item.isNowDay}}" class="number">{{item.timeSlot}}</view>
|
||||
<view wx:if="{{item.isNowDay}}" class="number" style="color: #4e96f8;">{{item.timeSlot}}</view>
|
||||
<view class="status" style="color: {{item.statusColor}};">{{item.statusName}}</view>
|
||||
</view>
|
||||
<view class="contentView" bind:tap="jumpMeetingDetail" data-id="{{item.id}}">
|
||||
|
@ -205,7 +205,7 @@ Page({
|
||||
formartData(queryDataList) {
|
||||
// 格式化数据
|
||||
return queryDataList.map(item => {
|
||||
item.timeSlot = selfFormatTimeYMD(item.start) + ' ' + selfFormatTimeHM(item.start) + '~' + selfFormatTimeHM(item.end);
|
||||
item.timeSlot = selfFormatTimeYMD(item.start) + ' '+ getWeekday(item.start) + ' ' + selfFormatTimeHM(item.start) + '~' + selfFormatTimeHM(item.end);
|
||||
// 状态字体颜色
|
||||
let statusColor = "#FFB119";
|
||||
// 按钮是否显示
|
||||
|
@ -21,7 +21,7 @@
|
||||
<image class="img" src="{{IMG_NAME + item.indoorPicUrlFirst}}" mode="aspectFill"></image>
|
||||
<view class="msgView">
|
||||
<view class="title">{{item.floor}} | {{item.roomNum}} | {{item.capacityNum}}人 | {{item.typeName}}</view>
|
||||
<view class="name">预约人: {{item.bookingUserName}}</view>
|
||||
<view class="name">预约人: {{item.userOrg}} - {{item.bookingUserName}}</view>
|
||||
<view class="time">{{item.timeSlot}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -1,6 +1,5 @@
|
||||
let app = getApp();
|
||||
|
||||
|
||||
//返回 例 2017
|
||||
const formatYear = data => {
|
||||
var date = data.date;
|
||||
@ -360,6 +359,11 @@ function getWeekday(dateStr) {
|
||||
return weekDays[weekday];
|
||||
}
|
||||
|
||||
function getNowDate() {
|
||||
const today = new Date();
|
||||
return today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate()
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
formatTime: formatTime,
|
||||
formatDate: formatDate,
|
||||
@ -375,6 +379,7 @@ module.exports = {
|
||||
selfFormatTimeYMDH,
|
||||
twoTimeInterval,
|
||||
getWeekday,
|
||||
getNowDate,
|
||||
twoTimeIntervalReturnHours,
|
||||
selfArrSum,
|
||||
getUrlParamsObj,
|
||||
|
Loading…
x
Reference in New Issue
Block a user