mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 16:39:37 +08:00
1
This commit is contained in:
parent
2692a79e91
commit
bdd7137011
@ -11,7 +11,11 @@ export function meetingRoomDict(param) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 会议室列表
|
||||||
|
export function meetingRoomListRq(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/roomContent/list',
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
const app = getApp()
|
const app = getApp()
|
||||||
import {
|
import {
|
||||||
meetingRoomDict,
|
meetingRoomDict,
|
||||||
|
meetingRoomListRq,
|
||||||
} from "../../../api/meeting/meetingRoom.js"
|
} from "../../../api/meeting/meetingRoom.js"
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
@ -10,6 +11,7 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
IMG_NAME: app.IMG_NAME,
|
IMG_NAME: app.IMG_NAME,
|
||||||
|
roomDataList: [],
|
||||||
queryParam: {
|
queryParam: {
|
||||||
meetingTypeDict: {
|
meetingTypeDict: {
|
||||||
list: [],
|
list: [],
|
||||||
@ -99,10 +101,6 @@ Page({
|
|||||||
value: item.name
|
value: item.name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
list = [{
|
|
||||||
text: "设备",
|
|
||||||
value: null
|
|
||||||
}, ...list]
|
|
||||||
// 赋值参数
|
// 赋值参数
|
||||||
let queryParam = _this.data.queryParam;
|
let queryParam = _this.data.queryParam;
|
||||||
queryParam.itemDict.list = list;
|
queryParam.itemDict.list = list;
|
||||||
@ -132,6 +130,9 @@ Page({
|
|||||||
})
|
})
|
||||||
console.log('meetingRoomDict("4")=>', list);
|
console.log('meetingRoomDict("4")=>', list);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 数据-会议室列表
|
||||||
|
this.meetingRoomList()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询条件变动
|
// 查询条件变动
|
||||||
@ -142,6 +143,8 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
queryParam
|
queryParam
|
||||||
})
|
})
|
||||||
|
// 数据-会议室列表
|
||||||
|
this.meetingRoomList()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 设备-多选
|
// 设备-多选
|
||||||
@ -156,15 +159,46 @@ Page({
|
|||||||
}
|
}
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
|
// 计算选择数量
|
||||||
|
let selectCount = queryParam.itemDict.list.filter(item => item.select).length;
|
||||||
|
console.log('selectCount', selectCount);
|
||||||
|
if (selectCount > 0) {
|
||||||
|
queryParam.itemDict.title = '设备+' + selectCount;
|
||||||
|
} else {
|
||||||
|
queryParam.itemDict.title = '设备';
|
||||||
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
queryParam
|
queryParam
|
||||||
})
|
})
|
||||||
|
// 数据-会议室列表
|
||||||
|
this.meetingRoomList()
|
||||||
},
|
},
|
||||||
// 设备多选确定
|
// 设备多选收起
|
||||||
itemDictConfirm() {
|
itemDictConfirm() {
|
||||||
this.selectComponent('#itemSelect').toggle();
|
this.selectComponent('#itemSelect').toggle();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 数据-会议室列表
|
||||||
|
meetingRoomList() {
|
||||||
|
let _this = this;
|
||||||
|
let queryParam = _this.data.queryParam;
|
||||||
|
let roomItemList = queryParam.itemDict.list.filter(item => item.select).map(item => {
|
||||||
|
return {
|
||||||
|
"name": item.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let param = {
|
||||||
|
"type": queryParam.meetingTypeDict.value,
|
||||||
|
"capacityNum": queryParam.personDict.value,
|
||||||
|
"roomItemList": roomItemList,
|
||||||
|
"shape": queryParam.shapeDict.value,
|
||||||
|
}
|
||||||
|
// 会议室列表数据
|
||||||
|
meetingRoomListRq(param).then(res => {
|
||||||
|
console.log('meetingRoomListRq', res);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 会议室
|
// 会议室
|
||||||
jumpMeetingRoom() {
|
jumpMeetingRoom() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<van-switch slot="right-icon" size="24px" style="height: 26px" checked="{{ item.select }}" active-color="#3c8bf2" bind:change="dictSwitchChange" data-name="{{item.text}}"/>
|
<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>
|
</van-cell>
|
||||||
<view style="padding:30rpx;">
|
<view style="padding:30rpx;">
|
||||||
<van-button type="danger" block round bind:click="itemDictConfirm" color="#3c8bf2">确认</van-button>
|
<van-button type="danger" block round bind:click="itemDictConfirm" color="#3c8bf2">收起</van-button>
|
||||||
</view>
|
</view>
|
||||||
</van-dropdown-item>
|
</van-dropdown-item>
|
||||||
<!-- 字典-形式 -->
|
<!-- 字典-形式 -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user