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
616c47b17a
commit
2692a79e91
@ -3,9 +3,15 @@ import {
|
|||||||
} from '../selfRequest';
|
} from '../selfRequest';
|
||||||
|
|
||||||
// 查询条件筛选
|
// 查询条件筛选
|
||||||
export function loginRq(param) {
|
// 1.会议室类型,2.人数,3.会议室设备,4.形式
|
||||||
|
export function meetingRoomDict(param) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/roomContent/searchInfo/' + param,
|
url: '/api/roomContent/searchInfo/' + param,
|
||||||
method: "get",
|
method: "get",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
const app = getApp()
|
const app = getApp()
|
||||||
|
import {
|
||||||
|
meetingRoomDict,
|
||||||
|
} from "../../../api/meeting/meetingRoom.js"
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -7,25 +11,23 @@ Page({
|
|||||||
data: {
|
data: {
|
||||||
IMG_NAME: app.IMG_NAME,
|
IMG_NAME: app.IMG_NAME,
|
||||||
queryParam: {
|
queryParam: {
|
||||||
switchTitle1: '包邮',
|
|
||||||
switchTitle2: '团购',
|
|
||||||
itemTitle: '筛选',
|
|
||||||
meetingTypeDict: {
|
meetingTypeDict: {
|
||||||
list: [{
|
list: [],
|
||||||
text: '会议室类型',
|
value: null,
|
||||||
value: 0
|
},
|
||||||
},
|
personDict: {
|
||||||
{
|
list: [],
|
||||||
text: '会议室',
|
value: null,
|
||||||
value: 1
|
},
|
||||||
},
|
itemDict: {
|
||||||
{
|
list: [],
|
||||||
text: '茶室',
|
value: null,
|
||||||
value: 2
|
title: '设备'
|
||||||
},
|
},
|
||||||
],
|
shapeDict: {
|
||||||
value: 0,
|
list: [],
|
||||||
}
|
value: null,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -37,18 +39,132 @@ Page({
|
|||||||
wx.setNavigationBarTitle({
|
wx.setNavigationBarTitle({
|
||||||
title: options.name
|
title: options.name
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 初始化数据
|
||||||
|
this.initData();
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询条件-会议类型
|
// 初始化数据
|
||||||
meetingTypeQueryChange(e){
|
initData() {
|
||||||
console.log('meetingTypeQueryChange', e);
|
let _this = this;
|
||||||
|
// 1.会议室类型,2.人数,3.会议室设备,4.形式
|
||||||
|
meetingRoomDict("1").then(res => {
|
||||||
|
console.log('meetingRoomDict("1")', res);
|
||||||
|
// 封装参数
|
||||||
|
let list = res.roomContents.map(item => {
|
||||||
|
return {
|
||||||
|
text: item.typeName,
|
||||||
|
value: item.typeValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
list = [{
|
||||||
|
text: "类型",
|
||||||
|
value: null
|
||||||
|
}, ...list]
|
||||||
|
// 赋值参数
|
||||||
|
let queryParam = _this.data.queryParam;
|
||||||
|
queryParam.meetingTypeDict.list = list;
|
||||||
|
_this.setData({
|
||||||
|
queryParam
|
||||||
|
})
|
||||||
|
console.log('meetingRoomDict("1")=>', list);
|
||||||
|
})
|
||||||
|
meetingRoomDict("2").then(res => {
|
||||||
|
console.log('meetingRoomDict("2")', res);
|
||||||
|
// 封装参数
|
||||||
|
let list = res.roomContents.map(item => {
|
||||||
|
return {
|
||||||
|
text: item.capacityNum + '人',
|
||||||
|
value: item.capacityNum
|
||||||
|
}
|
||||||
|
})
|
||||||
|
list = [{
|
||||||
|
text: "人数",
|
||||||
|
value: null
|
||||||
|
}, ...list]
|
||||||
|
// 赋值参数
|
||||||
|
let queryParam = _this.data.queryParam;
|
||||||
|
queryParam.personDict.list = list;
|
||||||
|
_this.setData({
|
||||||
|
queryParam
|
||||||
|
})
|
||||||
|
console.log('meetingRoomDict("2")=>', list);
|
||||||
|
})
|
||||||
|
meetingRoomDict("3").then(res => {
|
||||||
|
console.log('meetingRoomDict("3")', res);
|
||||||
|
// 封装参数
|
||||||
|
let list = res.roomItem.map(item => {
|
||||||
|
return {
|
||||||
|
text: item.name,
|
||||||
|
value: item.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
list = [{
|
||||||
|
text: "设备",
|
||||||
|
value: null
|
||||||
|
}, ...list]
|
||||||
|
// 赋值参数
|
||||||
|
let queryParam = _this.data.queryParam;
|
||||||
|
queryParam.itemDict.list = list;
|
||||||
|
_this.setData({
|
||||||
|
queryParam
|
||||||
|
})
|
||||||
|
console.log('meetingRoomDict("3")=>', list);
|
||||||
|
})
|
||||||
|
meetingRoomDict("4").then(res => {
|
||||||
|
console.log('meetingRoomDict("4")', res);
|
||||||
|
// 封装参数
|
||||||
|
let list = res.roomContents.map(item => {
|
||||||
|
return {
|
||||||
|
text: item.shape,
|
||||||
|
value: item.shape
|
||||||
|
}
|
||||||
|
})
|
||||||
|
list = [{
|
||||||
|
text: "形式",
|
||||||
|
value: null
|
||||||
|
}, ...list]
|
||||||
|
// 赋值参数
|
||||||
|
let queryParam = _this.data.queryParam;
|
||||||
|
queryParam.shapeDict.list = list;
|
||||||
|
_this.setData({
|
||||||
|
queryParam
|
||||||
|
})
|
||||||
|
console.log('meetingRoomDict("4")=>', list);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询条件变动
|
||||||
|
dictChange(e) {
|
||||||
|
console.log('dictChange', e);
|
||||||
let queryParam = this.data.queryParam;
|
let queryParam = this.data.queryParam;
|
||||||
queryParam.meetingTypeDict.value = e.detail;
|
queryParam[e.currentTarget.dataset.type].value = e.detail;
|
||||||
this.setData({
|
this.setData({
|
||||||
queryParam
|
queryParam
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 设备-多选
|
||||||
|
dictSwitchChange(e) {
|
||||||
|
console.log('dictSwitchChange', e);
|
||||||
|
let select = e.detail;
|
||||||
|
let name = e.currentTarget.dataset.name;
|
||||||
|
let queryParam = this.data.queryParam;
|
||||||
|
queryParam.itemDict.list = queryParam.itemDict.list.map(item => {
|
||||||
|
if (item.text == name) {
|
||||||
|
item.select = select;
|
||||||
|
}
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
this.setData({
|
||||||
|
queryParam
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 设备多选确定
|
||||||
|
itemDictConfirm() {
|
||||||
|
this.selectComponent('#itemSelect').toggle();
|
||||||
|
},
|
||||||
|
|
||||||
// 会议室
|
// 会议室
|
||||||
jumpMeetingRoom() {
|
jumpMeetingRoom() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
|
@ -3,17 +3,31 @@
|
|||||||
<!-- 筛选条件 -->
|
<!-- 筛选条件 -->
|
||||||
<view class="queryView">
|
<view class="queryView">
|
||||||
<van-dropdown-menu active-color="#4e96f8">
|
<van-dropdown-menu active-color="#4e96f8">
|
||||||
<van-dropdown-item value="{{ queryParam.meetingTypeDict.value }}" options="{{ queryParam.meetingTypeDict.list }}" bind:change="meetingTypeQueryChange"/>
|
<!-- 字典-会议室 -->
|
||||||
|
<van-dropdown-item value="{{ queryParam.meetingTypeDict.value }}" options="{{ queryParam.meetingTypeDict.list }}" bind:change="dictChange" data-type="meetingTypeDict" />
|
||||||
|
<!-- 字典-人数 -->
|
||||||
|
<van-dropdown-item value="{{ queryParam.personDict.value }}" options="{{ queryParam.personDict.list }}" bind:change="dictChange" data-type="personDict" />
|
||||||
|
<!-- 字典-设备 -->
|
||||||
|
<van-dropdown-item id="itemSelect" title="{{ queryParam.itemDict.title }}">
|
||||||
|
<van-cell title="{{ item.text }}" wx:for="{{queryParam.itemDict.list}}" wx:key="*this">
|
||||||
|
<van-switch slot="right-icon" size="24px" style="height: 26px" checked="{{ item.select }}" active-color="#3c8bf2" bind:change="dictSwitchChange" data-name="{{item.text}}"/>
|
||||||
|
</van-cell>
|
||||||
|
<view style="padding:30rpx;">
|
||||||
|
<van-button type="danger" block round bind:click="itemDictConfirm" color="#3c8bf2">确认</van-button>
|
||||||
|
</view>
|
||||||
|
</van-dropdown-item>
|
||||||
|
<!-- 字典-形式 -->
|
||||||
|
<van-dropdown-item value="{{ queryParam.shapeDict.value }}" options="{{ queryParam.shapeDict.list }}" bind:change="dictChange" data-type="shapeDict" />
|
||||||
</van-dropdown-menu>
|
</van-dropdown-menu>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 会议室列表 -->
|
<!-- 会议室列表 -->
|
||||||
<view class="meetingRoomView">
|
<view class="meetingRoomView">
|
||||||
<view class="meetingRoomItem" bind:tap="jumpMeetingRoom" wx:for="{{6}}" wx:for-index="idx">
|
<view class="meetingRoomItem" bind:tap="jumpMeetingRoom" wx:for="{{6}}" wx:for-index="idx" wx:key="*this">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="title">10人间 | B2A | 12F</view>
|
<view class="title">10人间 | B2A | 12F</view>
|
||||||
<view class="articleView">
|
<view class="articleView">
|
||||||
<view class="article" wx:for="{{3}}">#电视</view>
|
<view class="article" wx:for="{{3}}" wx:key="*this">#电视</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="propOpen"></view>
|
<view class="propOpen"></view>
|
||||||
<view class="priceView">
|
<view class="priceView">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user