mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 20:09:37 +08:00
实现进入预约记录页默认为待开始-20250522
This commit is contained in:
parent
7c37fc1cf4
commit
c9e652e1fa
@ -22,7 +22,7 @@ Page({
|
||||
type: "record",
|
||||
name: "预约记录",
|
||||
img: "/profile/static/meeting/index/record.png",
|
||||
path: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord",
|
||||
path: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord?status=7",
|
||||
visible: true
|
||||
}, {
|
||||
type: "approve",
|
||||
@ -85,7 +85,7 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
Dialog.alert({
|
||||
message: '1、此系统分配的账号仅用于会议室申请预约,请各单位专人扎口负责会议预定管理工作。\n2、系统提示“预约提交成功”后请及时关注预约进度和短信通知!若有疑问请随时拨打会议服务热线:83605343。\n3、会议开始前如需调整会议,请及时通过系统操作或电话告知,已预约成功的会议室可能因临时重大会议取消或调剂,请理解配合。\n注:会议预定系统技术支持QQ群:技术支持临时群(929670630)',
|
||||
message: '1、此系统分配的账号仅用于会议室申请预约,请各单位专人扎口负责会议预定管理工作。\n2、系统提示"预约提交成功"后请及时关注预约进度和短信通知!若有疑问请随时拨打会议服务热线:83605343。\n3、会议开始前如需调整会议,请及时通过系统操作或电话告知,已预约成功的会议室可能因临时重大会议取消或调剂,请理解配合。\n注:会议预定系统技术支持QQ群:技术支持临时群(929670630)',
|
||||
messageAlign: 'left',
|
||||
}).then(() => {
|
||||
// on close
|
||||
@ -205,7 +205,7 @@ Page({
|
||||
item.visible = true
|
||||
}
|
||||
if (item.type == 'record') {
|
||||
item.path = '/pages/meeting/reservationRecord/approve/approve?act=show'
|
||||
item.path = '/pages/meeting/reservationRecord/approve/approve?act=show&status=7'
|
||||
item.visible = true
|
||||
}
|
||||
return item
|
||||
|
@ -174,8 +174,8 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let act = options.act
|
||||
if (act == 'show') {
|
||||
// 这里opt接收options以处理查看更多
|
||||
if (options.act == 'show') {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '预约记录',
|
||||
})
|
||||
@ -183,6 +183,23 @@ Page({
|
||||
'search.status.value': ''
|
||||
})
|
||||
}
|
||||
|
||||
// 检查是否有URL参数指定状态
|
||||
if (options && options.status) {
|
||||
this.setData({
|
||||
'search.status.value': parseInt(options.status) || 7
|
||||
});
|
||||
|
||||
// 初始化状态文本
|
||||
const statusOption = this.data.search.status.option;
|
||||
const selectedOption = statusOption.find(option => option.value === this.data.search.status.value);
|
||||
if (selectedOption) {
|
||||
this.setData({
|
||||
'search.status.text': selectedOption.text
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
let _this = this;
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
_this.setData({
|
||||
|
@ -35,7 +35,8 @@ Page({
|
||||
value: ''
|
||||
},
|
||||
status: {
|
||||
value: '',
|
||||
text: '待开始',
|
||||
value: 7,
|
||||
option: [{
|
||||
text: '全部预约',
|
||||
value: ''
|
||||
@ -154,6 +155,23 @@ Page({
|
||||
reservationIsDataAll: false,
|
||||
['search.status.value']: e.detail
|
||||
})
|
||||
|
||||
// 更新状态文本
|
||||
const statusOption = this.data.search.status.option;
|
||||
const selectedOption = statusOption.find(option => option.value === e.detail);
|
||||
if (selectedOption) {
|
||||
this.setData({
|
||||
['search.status.text']: selectedOption.text
|
||||
});
|
||||
// 手动更新页面组件
|
||||
if (this.selectComponent) {
|
||||
const dropdown = this.selectComponent('.van-dropdown-menu');
|
||||
if (dropdown) {
|
||||
dropdown.updateItemTitle(1, selectedOption.text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.getDataList()
|
||||
},
|
||||
changeSearchSort(e) {
|
||||
@ -172,17 +190,27 @@ Page({
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
|
||||
// 检查是否有URL参数指定状态
|
||||
if (options && options.status) {
|
||||
this.setData({
|
||||
['search.status.value']: parseInt(options.status) || 7
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化状态文本
|
||||
const statusOption = _this.data.search.status.option;
|
||||
const selectedOption = statusOption.find(option => option.value === _this.data.search.status.value);
|
||||
let statusText = '待开始';
|
||||
if (selectedOption) {
|
||||
statusText = selectedOption.text;
|
||||
}
|
||||
|
||||
_this.setData({
|
||||
userData: userDetail,
|
||||
['search.status.text']: statusText
|
||||
})
|
||||
// 获取数据
|
||||
let userId = _this.data.userData.id
|
||||
// 获取预约数据
|
||||
_this.getReservationData({
|
||||
userId,
|
||||
pageNum: _this.data.reservationPageNum,
|
||||
pageSize: _this.data.reservationPageSize,
|
||||
})
|
||||
|
||||
// 获取两周后时间,默认只能选两周之后,管理员可以选一年后的
|
||||
const today = new Date()
|
||||
const newDate = new Date(today)
|
||||
@ -195,6 +223,9 @@ Page({
|
||||
maxDate: newDate.getTime()
|
||||
})
|
||||
|
||||
// 使用getDataList统一获取数据,确保应用筛选条件
|
||||
_this.getDataList();
|
||||
|
||||
// 获取参与数据
|
||||
// _this.getParticipateData({
|
||||
// userId,
|
||||
@ -574,7 +605,10 @@ Page({
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
// 确保初始状态正确
|
||||
this.setData({
|
||||
['search.status.value']: 7 // 确保状态值为待开始
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@
|
||||
</view>
|
||||
</van-tab>
|
||||
</van-tabs> -->
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-menu class="van-dropdown-menu">
|
||||
<van-dropdown-item id="item" title="{{ search.title.text }}">
|
||||
<van-cell>
|
||||
<van-field clearable value="{{ search.title.value }}" placeholder="请输入会议名称模糊查询" bind:change="changeSearchTitle" />
|
||||
@ -61,7 +61,7 @@
|
||||
</van-button>
|
||||
</view>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item value="{{ search.status.value }}" options="{{ search.status.option }}" bind:change="changeSearchStatus" />
|
||||
<van-dropdown-item title="待开始" value="{{ search.status.value }}" options="{{ search.status.option }}" bind:change="changeSearchStatus" />
|
||||
<van-dropdown-item value="{{ search.sort.value }}" options="{{ search.sort.option }}" bind:change="changeSearchSort" />
|
||||
</van-dropdown-menu>
|
||||
<view class="itemView" wx:for="{{reservationDataList}}" wx:for-item="item" wx:key="*this">
|
||||
|
Loading…
x
Reference in New Issue
Block a user