| | |
| | | <view class="name">会议时间</view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | {{ param.activeDate }} {{ param.startTime }}-{{ param.endTime }} |
| | | {{ param.activeDate || param.meetingDate }} |
| | | <text class="ml12" v-if="!param.id">{{ param.startTime }}-{{ param.endTime }}</text> |
| | | <text class="ml12" v-if="param.id">{{ param.meetingTime }}</text> |
| | | </view> |
| | | <u-icon name="arrow-right" color="#999999" size="14" /> |
| | | </view> |
| | |
| | | <view class="line" @click="selPeople"> |
| | | <view class="label"> |
| | | <text v-if="param.sysList && param.sysList.length > 0"> |
| | | {{ param.sysList.map(i=>i.realname).join(',') }} |
| | | {{ param.sysList.map((i) => i.realname).join(",") }} |
| | | </text> |
| | | <text |
| | | v-else |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="sub_btn" @click="onSubmit"> 确认预约 </view> |
| | | <view v-if="param.id" class="sub_btn" @click="onUpdate">确认修改</view> |
| | | <view v-else class="sub_btn" @click="onSubmit"> 确认预约 </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | <script> |
| | | import { |
| | | reservationMeeting, |
| | | getRoomDetail |
| | | getRoomDetail, |
| | | meetingDetail, |
| | | updateById, |
| | | getAppRoomDetail |
| | | } from '@/api' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | if (option.id) { |
| | | uni.setNavigationBarTitle({ |
| | | title: '会议详情' |
| | | }) |
| | | this.getDetail(option.id) |
| | | } else { |
| | | this.param = { ...option } |
| | | const bookingTimeList = option.bookingTimeList.split(',').map(i => { |
| | | return { |
| | | timeId: Number(i) |
| | | } |
| | | }) |
| | | this.$set(this.param, 'bookingTimeList', bookingTimeList) |
| | | this.$set(this.param, 'activeDate', dayjs(option.yudingDate).format('YYYY年M月D日')) |
| | | this.initOption() |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$eventBus.$on('meetingPeo', (res) => { |
| | | this.$set(this.param, 'sysList', res) |
| | | this.$set(this.param, 'sysList', res.map(i => { |
| | | i.userId = i.id |
| | | return i |
| | | })) |
| | | // this.$set(this.param, 'memberIds', res.map(i => i.id).join(',')) |
| | | // this.$set(this.param, 'memberNames', res.map(i => i.name).join(',')) |
| | | }) |
| | | }, |
| | | methods: { |
| | | getDetail(id) { |
| | | meetingDetail({ id }).then(res => { |
| | | this.param = { ...res.data,name: res.data.meetingName, content: res.data.meetingContent, sysList: res.data.userResponseList } |
| | | // this.param = { ...res.data } |
| | | if(this.param.sysList && this.param.sysList.length > 0){ |
| | | this.param.sysList.forEach(i => { |
| | | i.userId = i.id |
| | | }) |
| | | } |
| | | getRoomDetail({ roomId: res.data.roomId }).then(ress => { |
| | | this.info = ress.data |
| | | if (this.info && this.info.projectList) { |
| | | this.info.projectList.forEach(i => { |
| | | i.checked = false |
| | | if(res.data.projectsResponseList && res.data.projectsResponseList.length > 0){ |
| | | res.data.projectsResponseList.forEach(item2 => { |
| | | if(i.projectId === item2.id){ |
| | | i.checked = true |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | onUpdate() { |
| | | const { param, info } = this |
| | | if (!param.name) return uni.showToast({ |
| | | title: '请输入会议主题', |
| | | icon: 'none' |
| | | }) |
| | | reservationMeeting({ |
| | | ...param, |
| | | projectList: info.projectList.filter(i => i.checked), |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: '修改成功', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | uni.redirectTo({ |
| | | url: '/pages/staff/index' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | onSubmit() { |
| | | const { param, info } = this |
| | | if (!param.name) return uni.showToast({ |
| | |
| | | projectList: info.projectList.filter(i => i.checked), |
| | | }).then(res => { |
| | | if(res.code === 200){ |
| | | |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: '预约成功', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | uni.redirectTo({ |
| | | url: '/pages/staff/index' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | initOption() { |
| | | const roomId = Number(this.param.roomId) |
| | | getRoomDetail({ roomId }).then(res => { |
| | | res.data.projectList.forEach(item => { |
| | | item.active = false |
| | | }) |
| | | this.info = res.data |
| | | if(this.info && this.info.projectList){ |
| | | this.info.projectList.forEach(i => { |
| | | i.checked = false |
| | | |
| | | }) |
| | | } |
| | | }) |