mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 18:59:36 +08:00
描述:预约会议选择参会人员
This commit is contained in:
parent
2eaa688633
commit
ca4ddbf76f
@ -70,4 +70,13 @@ export function getChangyangPersonListRq() {
|
||||
url: '/api/roomContent/getChangyangPersonList',
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 修改参会人员
|
||||
export function updatePersonListRq(data) {
|
||||
return request({
|
||||
url: '/api/roomContent/updatePersonList',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
@ -102,7 +102,7 @@ Page({
|
||||
jumpMeetingPerson() {
|
||||
let ids = JSON.stringify(this.data.reservationPersonList.map(item => item.id))
|
||||
wx.navigateTo({
|
||||
url: `/pages/meeting/meetingRoom/meetingPerson/meetingPerson?ids=${ids}`
|
||||
url: `/pages/meeting/meetingRoom/meetingPerson/meetingPerson?pageType=add&ids=${ids}`
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
const app = getApp()
|
||||
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
getChangyangPersonListRq
|
||||
getChangyangPersonListRq,
|
||||
updatePersonListRq
|
||||
} from "../../../../api/meeting/visitorIinvitation.js"
|
||||
|
||||
Page({
|
||||
@ -10,7 +15,11 @@ Page({
|
||||
/** 数据*/
|
||||
dataList: [],
|
||||
//
|
||||
reservationId: null,
|
||||
roomContentId: null,
|
||||
ids: [],
|
||||
pageType: '',
|
||||
userData: null,
|
||||
},
|
||||
|
||||
/**
|
||||
@ -18,9 +27,11 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
let ids = JSON.parse(options.ids)
|
||||
options.ids = JSON.parse(options.ids)
|
||||
//
|
||||
_this.setData({
|
||||
ids
|
||||
...options,
|
||||
userData: wx.getStorageSync('user'),
|
||||
})
|
||||
//
|
||||
// 获取数据
|
||||
@ -122,6 +133,7 @@ Page({
|
||||
// 提交
|
||||
submit() {
|
||||
let _this = this;
|
||||
let pageType = _this.data.pageType
|
||||
let personList = []
|
||||
_this.data.dataList.map(data => {
|
||||
personList = personList.concat(data.list.filter(item => item.isSelect))
|
||||
@ -132,10 +144,32 @@ Page({
|
||||
// 上个页面数据
|
||||
// let detail = prevPage.data.detail;
|
||||
|
||||
// 赋值上个页面的数据
|
||||
prevPage.setData({
|
||||
reservationPersonList: personList
|
||||
})
|
||||
if (pageType == 'add') { // 添加
|
||||
// 赋值上个页面的数据
|
||||
prevPage.setData({
|
||||
reservationPersonList: personList
|
||||
})
|
||||
} else if (pageType == 'update') { // 修改
|
||||
updatePersonListRq({
|
||||
userId: _this.data.userData.id,
|
||||
roomContentId: _this.data.roomContentId,
|
||||
id: _this.data.reservationId,
|
||||
reservationPersonList: personList.map(item => {
|
||||
return {
|
||||
userId: item.id,
|
||||
roomContentId: _this.data.roomContentId
|
||||
}
|
||||
})
|
||||
}).then(res => {
|
||||
console.log('updatePersonListRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccess(Notify, res.msg)
|
||||
} else {
|
||||
app.vantNotifyErr(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 后退页面
|
||||
wx.navigateBack();
|
||||
},
|
||||
|
@ -5,6 +5,7 @@
|
||||
"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"
|
||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||
"van-notify": "@vant/weapp/notify/index"
|
||||
}
|
||||
}
|
@ -14,4 +14,7 @@
|
||||
|
||||
<view class="space"></view>
|
||||
|
||||
<view class="submitBtn" bind:tap="submit">提交</view>
|
||||
<view class="submitBtn" bind:tap="submit">提交</view>
|
||||
|
||||
<!-- 提示 -->
|
||||
<van-notify id="van-notify" />
|
@ -31,7 +31,8 @@ Page({
|
||||
id: null,
|
||||
detail: null,
|
||||
facilities: {},
|
||||
joinPersonList: []
|
||||
joinPersonList: [],
|
||||
dataChange: false,
|
||||
},
|
||||
|
||||
/**
|
||||
@ -42,8 +43,6 @@ Page({
|
||||
_this.setData({
|
||||
...options
|
||||
})
|
||||
// 获取详情
|
||||
_this.getDetail();
|
||||
},
|
||||
|
||||
// 获取详情
|
||||
@ -223,6 +222,20 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转-人员列表
|
||||
jumpMeetingPerson() {
|
||||
let _this = this
|
||||
// 人员列表id
|
||||
let ids = _this.data.detail.reservationPersonList.map(item => item.userId)
|
||||
ids = JSON.stringify(ids)
|
||||
// 预约id
|
||||
let reservationId = _this.data.detail.id
|
||||
let roomContentId = _this.data.detail.roomContentId
|
||||
wx.navigateTo({
|
||||
url: `/pages/meeting/meetingRoom/meetingPerson/meetingPerson?reservationId=${reservationId}&roomContentId=${roomContentId}&pageType=update&ids=${ids}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
@ -234,7 +247,11 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
let _this = this
|
||||
setTimeout(() => {
|
||||
// 获取详情
|
||||
_this.getDetail();
|
||||
}, 100);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -73,7 +73,12 @@
|
||||
|
||||
<!-- 参与人员 -->
|
||||
<view class="basicView">
|
||||
<view class="labelTitle leftLineTitle">参会人员({{joinPersonList.length}}/{{detail.reservationPersonList.length}})</view>
|
||||
<view class="labelTitle leftLineTitle">
|
||||
<view class="titleContainer">
|
||||
<view class="left">参会人员({{joinPersonList.length}}/{{detail.reservationPersonList.length}})</view>
|
||||
<view class="right" bind:tap="jumpMeetingPerson">管理</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cellView borderNone">
|
||||
<view class="joinView">
|
||||
<view class="joinPersonView" wx:for="{{joinPersonList}}" wx:key="*this">
|
||||
|
@ -63,6 +63,17 @@
|
||||
|
||||
.basicView {}
|
||||
|
||||
.basicView .titleContainer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.basicView .titleContainer .right {
|
||||
font-size: 30rpx;
|
||||
color: #3794FF;
|
||||
}
|
||||
|
||||
.basicView .labelTitle {
|
||||
margin: 40rpx 20rpx;
|
||||
font-size: 32rpx;
|
||||
@ -219,8 +230,7 @@
|
||||
}
|
||||
|
||||
|
||||
.facilitiesView {
|
||||
}
|
||||
.facilitiesView {}
|
||||
|
||||
.facilitiesView .itemView {
|
||||
display: flex;
|
||||
|
Loading…
x
Reference in New Issue
Block a user