ll
liukangdong
2025-02-25 5857dfa10b70a061b8e4711dd8f18b585ac6fc23
admin/src/views/meeting/bookings.vue
@@ -66,8 +66,7 @@
            @click="exportExcel">导出</el-button>
        </li>
      </ul>
      <el-table v-loading="isWorking.search" :data="tableData.list" stripe border
        @selection-change="handleSelectionChange">
      <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange">
        <!-- <el-table-column type="selection" align="center" width="55"></el-table-column> -->
        <el-table-column prop="name" label="会议主题" align="center" min-width="120px" show-overflow-tooltip>
          <template slot-scope="{ row }">
@@ -98,16 +97,19 @@
            'business:bookings:update',
            'business:bookings:delete',
          ])
        " label="操作" min-width="100" align="center" fixed="right">
        " label="操作" min-width="140" align="center" fixed="right">
          <template slot-scope="{ row }">
            <template>
              <el-button type="text" @click="$refs.operaBookingsDetailWindow.open('会议详情', row)">查看详情</el-button>
              <el-button v-if="row.meetingStatus == '1'" type="text"
                @click="$refs.operaBookingsWindow.open('编辑会议预约', row)"
                v-permissions="['business:bookings:update']">编辑</el-button>
              <el-button type="text" v-if="row.meetingStatus == '1'" @click="handleStart(row)">开始</el-button>
              <el-button v-if="row.meetingStatus == '1'" type="text" @click="cancelMeeting(row.id)"
                v-permissions="['business:bookings:update']">撤回</el-button>
              <el-button v-if="row.meetingStatus == '1' && row.creator === userInfo.id" type="text"
                @click="$refs.operaBookingsWindow.open('编辑会议预约', row)">编辑</el-button>
              <el-button type="text"
                v-if="row.creator === userInfo.id && (row.meetingStatus == '1' || row.meetingStatus == '4')"
                @click="handleStart(row)">开始</el-button>
              <el-button type="text" v-if="row.creator === userInfo.id && row.meetingStatus == '2'"
                @click="handleEnd(row)">结束</el-button>
              <el-button v-if="row.creator === userInfo.id && (row.meetingStatus == '1' || row.meetingStatus == '4')"
                type="text" @click="cancelMeeting(row.id)">撤回</el-button>
            </template>
            <!-- <el-button v-else type="text" @click="deleteById(row)" v-permissions="['business:bookings:delete']">删除</el-button> -->
          </template>
@@ -132,7 +134,7 @@
import { findList } from '@/api/meeting/rooms'
import { getSystemDictData } from '@/api/system/dictData'
import { fetchList } from '@/api/business/company'
import { cancelById, bookingsDetail, startEarlyById, startById } from '@/api/meeting/bookings'
import { cancelById, bookingsDetail, startEarlyById, startById, meetingEndById } from '@/api/meeting/bookings'
import { timeForMat } from '@/utils/util'
export default {
  name: 'Bookings',
@@ -141,6 +143,7 @@
  data() {
    return {
      date: [],
      userInfo: this.$store.state.userInfo,
      // 搜索
      searchForm: {
        roomId: '',
@@ -249,10 +252,11 @@
    reset() {
      this.$refs.searchForm.resetFields()
      this.date = []
      this.searchForm.radio = '0'
      this.searchForm.radio = ''
      this.searchForm.startTime = ''
      this.searchForm.endTime = ''
      this.changeRadio('0')
      // this.changeRadio('0')
      this.search()
    },
    copy(row) {
      const text = `${row.realName} 邀请您加入会议\n会议主题:${row.name}\n会议室:${row.roomName}\n会议时间:${row.meetingTime}\n点击链接直接加入会议:\n${this.link}?id=${row.id}`
@@ -276,6 +280,18 @@
            })
        })
    },
    handleEnd(row) {
      this.$dialog.messageWaring('结束会议', '是否结束当前会议?')
        .then(() => {
          meetingEndById({ id: row.id })
            .then(() => {
              this.$message.success('会议已结束')
              this.handlePageChange()
            })
            .catch(e => {
            })
        })
    },
    cancelMeeting(id) {
      this.$dialog.messageWaring('取消会议', '是否取消当前会议?')
        .then(() => {