mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 17:49:36 +08:00
1
This commit is contained in:
parent
d9068e21fb
commit
a39e60ccf8
@ -62,4 +62,12 @@ export function selectVisitorRecordByIdRq(id) {
|
|||||||
url: '/api/visitor/selectVisitorRecordById/' + id,
|
url: '/api/visitor/selectVisitorRecordById/' + id,
|
||||||
method: "get",
|
method: "get",
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取参会人员列表
|
||||||
|
export function getChangyangPersonListRq() {
|
||||||
|
return request({
|
||||||
|
url: '/api/roomContent/getChangyangPersonList',
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
}
|
}
|
@ -6,15 +6,15 @@ App({
|
|||||||
parkId: '26', // 园区id
|
parkId: '26', // 园区id
|
||||||
parkName: '长阳智会云控', // 园区名称
|
parkName: '长阳智会云控', // 园区名称
|
||||||
// 本地测试
|
// 本地测试
|
||||||
// DOMAIN_NAME_PREFIX: ' http://wrqhey.natappfree.cc',
|
DOMAIN_NAME_PREFIX: ' http://192.168.0.30',
|
||||||
// DOMAIN_NAME: ' http://wrqhey.natappfree.cc', //接口域名
|
DOMAIN_NAME: ' http://192.168.0.30:9227', //接口域名
|
||||||
// IMG_NAME: ' http://wrqhey.natappfree.cc',
|
IMG_NAME: ' http://192.168.0.30:9227',
|
||||||
// socketUrl: 'wss://company.haxy.com.cn:4443/changyang-office/websocket-server',
|
socketUrl: 'wss://192.168.0.30:9227/changyang-office/websocket-server',
|
||||||
// 生产
|
// 生产
|
||||||
DOMAIN_NAME_PREFIX: 'https://www.chuangzhikj.com',
|
// DOMAIN_NAME_PREFIX: 'https://www.chuangzhikj.com',
|
||||||
DOMAIN_NAME: 'https://www.chuangzhikj.com/saas-ics', //接口域名
|
// DOMAIN_NAME: 'https://www.chuangzhikj.com/saas-ics', //接口域名
|
||||||
IMG_NAME: 'https://www.chuangzhikj.com/saas-ics',
|
// IMG_NAME: 'https://www.chuangzhikj.com/saas-ics',
|
||||||
socketUrl: 'wss://company.haxy.com.cn:4443/changyang-office/websocket-server',
|
// socketUrl: 'wss://company.haxy.com.cn:4443/changyang-office/websocket-server',
|
||||||
globals: {
|
globals: {
|
||||||
refreshMyPages: false,
|
refreshMyPages: false,
|
||||||
homedata: {},
|
homedata: {},
|
||||||
|
@ -73,6 +73,7 @@
|
|||||||
"pages/meeting/reservationRecord/exhibitionRecord/list/list",
|
"pages/meeting/reservationRecord/exhibitionRecord/list/list",
|
||||||
"pages/meeting/reservationRecord/exhibitionRecord/detail/detail",
|
"pages/meeting/reservationRecord/exhibitionRecord/detail/detail",
|
||||||
"pages/meeting/meetingRoom/meetingService/meetingService",
|
"pages/meeting/meetingRoom/meetingService/meetingService",
|
||||||
|
"pages/meeting/meetingRoom/meetingPerson/meetingPerson",
|
||||||
"pages/smartDevice/region/region",
|
"pages/smartDevice/region/region",
|
||||||
"pages/smartDevice/room/room"
|
"pages/smartDevice/room/room"
|
||||||
],
|
],
|
||||||
|
@ -36,7 +36,7 @@ Page({
|
|||||||
userData: {},
|
userData: {},
|
||||||
serviceList: [],
|
serviceList: [],
|
||||||
title: '',
|
title: '',
|
||||||
personNum: '',
|
reservationPersonList: [],
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -98,27 +98,29 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 跳转-人员列表
|
||||||
|
jumpMeetingPerson() {
|
||||||
|
let ids = JSON.stringify(this.data.reservationPersonList.map(item => item.id))
|
||||||
|
wx.navigateTo({
|
||||||
|
url: `/pages/meeting/meetingRoom/meetingPerson/meetingPerson?ids=${ids}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 提交订单
|
// 提交订单
|
||||||
submitCase() {
|
submitCase() {
|
||||||
let _this = this
|
let _this = this
|
||||||
// 参数校验
|
// 参数校验
|
||||||
|
// 主题
|
||||||
if (!_this.data.title) {
|
if (!_this.data.title) {
|
||||||
// 错误提示
|
app.vantNotifyErr(Notify, '请输入会议主题!')
|
||||||
Notify({
|
|
||||||
type: 'danger',
|
|
||||||
message: '请输入会议主题!'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (_this.data.personNum == '') {
|
|
||||||
// 错误提示
|
|
||||||
Notify({
|
|
||||||
type: 'danger',
|
|
||||||
message: '请输入参会人数!'
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 参会人员
|
||||||
|
let reservationPersonList = _this.data.reservationPersonList.map(item => {
|
||||||
|
return {
|
||||||
|
userId: item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
// 过滤选择的服务
|
// 过滤选择的服务
|
||||||
let serviceList = _this.data.serviceList.filter(item => item.isSelect)
|
let serviceList = _this.data.serviceList.filter(item => item.isSelect)
|
||||||
|
|
||||||
@ -127,7 +129,7 @@ Page({
|
|||||||
"userId": _this.data.userData.id,
|
"userId": _this.data.userData.id,
|
||||||
"customerId": _this.data.userData.icsCustomerId,
|
"customerId": _this.data.userData.icsCustomerId,
|
||||||
"title": _this.data.title,
|
"title": _this.data.title,
|
||||||
"personNum": _this.data.personNum,
|
reservationPersonList,
|
||||||
"startTime": _this.data.startTime,
|
"startTime": _this.data.startTime,
|
||||||
"endDate": _this.data.endTime,
|
"endDate": _this.data.endTime,
|
||||||
"orderMoney": 0,
|
"orderMoney": 0,
|
||||||
|
@ -47,10 +47,10 @@
|
|||||||
<van-field value="{{ title }}" placeholder="请输入会议主题" clearable input-align="right" border="{{ false }}" data-name="title" bind:change="inputChange" />
|
<van-field value="{{ title }}" placeholder="请输入会议主题" clearable input-align="right" border="{{ false }}" data-name="title" bind:change="inputChange" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView">
|
<view class="itemView" bind:tap="jumpMeetingPerson">
|
||||||
<view class="label">参会人数</view>
|
<view class="label">参会人员</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<van-field value="{{ personNum }}" placeholder="请输入参会人数" type="number" clearable input-align="right" border="{{ false }}" data-name="personNum" bind:change="inputChange" />
|
<van-icon name="arrow" size="44rpx" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView" bind:tap="jumpMeetingFacilities">
|
<view class="itemView" bind:tap="jumpMeetingFacilities">
|
||||||
|
@ -0,0 +1,191 @@
|
|||||||
|
import {
|
||||||
|
getChangyangPersonListRq
|
||||||
|
} from "../../../../api/meeting/visitorIinvitation.js"
|
||||||
|
|
||||||
|
Page({
|
||||||
|
|
||||||
|
data: {
|
||||||
|
/** 索引栏*/
|
||||||
|
indexList: [],
|
||||||
|
/** 数据*/
|
||||||
|
dataList: [],
|
||||||
|
//
|
||||||
|
ids: [],
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
let _this = this;
|
||||||
|
let ids = JSON.parse(options.ids)
|
||||||
|
_this.setData({
|
||||||
|
ids
|
||||||
|
})
|
||||||
|
//
|
||||||
|
// 获取数据
|
||||||
|
_this.getDataList()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取数据
|
||||||
|
getDataList() {
|
||||||
|
let _this = this;
|
||||||
|
getChangyangPersonListRq().then(res => {
|
||||||
|
console.log('getChangyangPersonListRq', res);
|
||||||
|
let filterDataList = res.data.map(item => {
|
||||||
|
let id = item.id
|
||||||
|
let label = `${item.name ? item.name : item.mobile}-${item.mobile}`
|
||||||
|
let isSelect = false
|
||||||
|
//
|
||||||
|
if (_this.data.ids.includes(id)) {
|
||||||
|
isSelect = true
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id,
|
||||||
|
label,
|
||||||
|
isSelect,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 赋值并且格式化数据
|
||||||
|
_this.setAndFormatData(filterDataList)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 格式化数据
|
||||||
|
setAndFormatData(transferList) {
|
||||||
|
let _this = this;
|
||||||
|
// 索引列
|
||||||
|
let indexList = _this.getFirstCharacterList(transferList)
|
||||||
|
// 对应每个索引的数据列表
|
||||||
|
let dataList = indexList.map(item => {
|
||||||
|
let title = item;
|
||||||
|
let collectList = [];
|
||||||
|
for (let i = 0; i < transferList.length; i++) {
|
||||||
|
let transferData = transferList[i];
|
||||||
|
if (title == transferData.label.substring(0, 1)) {
|
||||||
|
collectList.push(transferData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
title,
|
||||||
|
list: collectList
|
||||||
|
}
|
||||||
|
})
|
||||||
|
_this.setData({
|
||||||
|
indexList,
|
||||||
|
dataList
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取第一个字符数组,不重复
|
||||||
|
getFirstCharacterList(list) {
|
||||||
|
let firstNameList = list.map(item => {
|
||||||
|
return {
|
||||||
|
name: item.label.substring(0, 1),
|
||||||
|
exist: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
for (let i = 0; i < firstNameList.length; i++) {
|
||||||
|
for (let j = i + 1; j < firstNameList.length; j++) {
|
||||||
|
// 已重复的数据直接跳过
|
||||||
|
if (firstNameList[j].exist) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 数据重复
|
||||||
|
if (firstNameList[i].name == firstNameList[j].name) {
|
||||||
|
firstNameList[j].exist = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return firstNameList.filter(item => !item.exist).map(item => item.name)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 选择
|
||||||
|
selectClick(e) {
|
||||||
|
console.log('selectClick', e);
|
||||||
|
let _this = this;
|
||||||
|
let id = e.currentTarget.dataset.data.id
|
||||||
|
let dataList = _this.data.dataList
|
||||||
|
dataList.map(data => {
|
||||||
|
data.list.map(item => {
|
||||||
|
if (item.id == id) {
|
||||||
|
item.isSelect = !item.isSelect
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return data
|
||||||
|
})
|
||||||
|
_this.setData({
|
||||||
|
dataList
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
submit() {
|
||||||
|
let _this = this;
|
||||||
|
let personList = []
|
||||||
|
_this.data.dataList.map(data => {
|
||||||
|
personList = personList.concat(data.list.filter(item => item.isSelect))
|
||||||
|
})
|
||||||
|
//
|
||||||
|
let pages = getCurrentPages(); //获取page
|
||||||
|
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
|
||||||
|
// 上个页面数据
|
||||||
|
// let detail = prevPage.data.detail;
|
||||||
|
|
||||||
|
// 赋值上个页面的数据
|
||||||
|
prevPage.setData({
|
||||||
|
reservationPersonList: personList
|
||||||
|
})
|
||||||
|
// 后退页面
|
||||||
|
wx.navigateBack();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "请选择参会人员",
|
||||||
|
"usingComponents": {
|
||||||
|
"van-cell": "@vant/weapp/cell/index",
|
||||||
|
"van-index-bar": "@vant/weapp/index-bar/index",
|
||||||
|
"van-index-anchor": "@vant/weapp/index-anchor/index",
|
||||||
|
"van-divider": "@vant/weapp/divider/index",
|
||||||
|
"van-checkbox": "@vant/weapp/checkbox/index"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<van-index-bar index-list="{{ indexList }}" highlight-color="#4e96f8">
|
||||||
|
<view wx:for="{{dataList}}" wx:key="*this" wx:for-item="indexData">
|
||||||
|
<van-index-anchor index="{{indexData.title}}"></van-index-anchor>
|
||||||
|
<van-cell wx:for="{{indexData.list}}" wx:key="*this" wx:for-item="item" data-data="{{item}}" bind:tap="selectClick">
|
||||||
|
<view class="itemView">
|
||||||
|
<van-checkbox value="{{ item.isSelect }}" shape="square"></van-checkbox>
|
||||||
|
<view class="label">{{item.label}}</view>
|
||||||
|
</view>
|
||||||
|
</van-cell>
|
||||||
|
</view>
|
||||||
|
</van-index-bar>
|
||||||
|
|
||||||
|
<van-divider wx:if="{{indexList.length == 0}}" contentPosition="center" customStyle="font-size: 28rpx; margin-top:120rpx;">暂无数据</van-divider>
|
||||||
|
|
||||||
|
<view class="space"></view>
|
||||||
|
|
||||||
|
<view class="submitBtn" bind:tap="submit">提交</view>
|
@ -0,0 +1,11 @@
|
|||||||
|
.itemView {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 100%;
|
||||||
|
height: 400rpx;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user