jiangping
2025-03-07 a0285d19d00697757f99fc75a4e45778854f5af9
admin/src/views/meeting/bookings.vue
@@ -1,5 +1,5 @@
<template>
  <TableLayout :permissions="['business:bookings:query']">
  <TableLayout rel="tableLayoutEle" :permissions="['business:bookings:query']">
    <!-- 搜索表单 -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
      <el-form-item label="会议室" prop="roomId">
@@ -55,7 +55,7 @@
    </el-form>
    <!-- 表格和分页 -->
    <template v-slot:table-wrap>
      <ul class="toolbar" v-permissions="[
      <ul class="toolbar" ref="toolbarEle" v-permissions="[
        'business:bookings:create',
        'business:bookings:exportExcel',
      ]">
@@ -69,7 +69,7 @@
            @click="exportExcel">导出</el-button>
        </li>
      </ul>
      <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange">
      <el-table :height="tableHeightNew" 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 }">
@@ -82,6 +82,10 @@
          </template>
        </el-table-column>
        <el-table-column prop="meetingTime" label="会议时间" align="center" min-width="120px"></el-table-column>
        <el-table-column prop="meetingTime" label="会议时间" align="center" min-width="120px"></el-table-column>
        <el-table-column prop="meetingTime" label="会议时间" align="center" min-width="120px"></el-table-column>
        <el-table-column prop="meetingTime" label="会议时间" align="center" min-width="400px"></el-table-column>
        <el-table-column prop="meetingTime" label="会议时间" align="center" min-width="300px"></el-table-column>
        <el-table-column prop="managerInfo" label="预约人" align="center" min-width="100px"></el-table-column>
        <el-table-column label="会议状态" align="center" min-width="60px">
          <template slot-scope="{ row }">
@@ -141,7 +145,7 @@
  name: 'Bookings',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaBookingsWindow, OperaBookingsDetailWindow },
  data() {
  data () {
    return {
      date: [],
      // userInfo: this.$store.state.userInfo,
@@ -184,12 +188,12 @@
      link: 'https://dmtest.ahapp.net/meeting_h5/' // H5_LINK_ADDR
    }
  },
  provide() {
  provide () {
    return {
      rooms: () => this.rooms
    }
  },
  created() {
  created () {
    this.config({
      module: '会议室预定信息表',
      api: '/meeting/bookings',
@@ -212,7 +216,7 @@
    this.changeRadio('0')
  },
  methods: {
    changeRadio(e) {
    changeRadio (e) {
      if (e === '0') {
        this.searchForm.startTime = timeForMat(0)[0]
        this.searchForm.endTime = timeForMat(0)[1]
@@ -232,7 +236,7 @@
      }
      this.search()
    },
    newTree(tree) {
    newTree (tree) {
      if (tree == null) {
        return []
      }
@@ -249,12 +253,12 @@
        return newItem
      })
    },
    selectDate(v) {
    selectDate (v) {
      this.searchForm.endTime = v[1] + ' 23:59:59'
      this.searchForm.startTime = v[0] + ' 00:00:00'
      this.searchForm.radio = null
    },
    reset() {
    reset () {
      this.$refs.searchForm.resetFields()
      this.date = []
      this.searchForm.radio = ''
@@ -263,7 +267,7 @@
      // this.changeRadio('0')
      this.search()
    },
    copy(row) {
    copy (row) {
      const text = `${row.realName} 邀请您加入会议\n会议主题:${row.name}\n会议室:${row.roomName}\n会议时间:${row.meetingTime}\n点击链接直接加入会议:\n${this.link}?id=${row.id}`
      this.$copyText(text)
        .then(() => {
@@ -272,10 +276,10 @@
        .catch(e => {
        })
    },
    handleStart(row) {
    handleStart (row) {
      this.$dialog.messageWaring('开始会议', '是否开始当前会议?')
        .then(() => {
          let fn = new Date(row.startTime).getTime() > new Date().getTime() ? startEarlyById : startById
          const fn = new Date(row.startTime).getTime() > new Date().getTime() ? startEarlyById : startById
          fn({ id: row.id })
            .then(() => {
              this.$message.success('会议已开始')
@@ -285,7 +289,7 @@
            })
        })
    },
    handleEnd(row) {
    handleEnd (row) {
      this.$dialog.messageWaring('结束会议', '是否结束当前会议?')
        .then(() => {
          meetingEndById({ id: row.id })
@@ -297,7 +301,7 @@
            })
        })
    },
    cancelMeeting(id) {
    cancelMeeting (id) {
      this.$dialog.messageWaring('取消会议', '是否取消当前会议?')
        .then(() => {
          cancelById({ id })
@@ -309,7 +313,7 @@
            })
        })
    },
    showDetail(id) {
    showDetail (id) {
      bookingsDetail(id)
        .then(res => {
          this.$refs.operaBookingsDetailWindow.open('会议详情', res)
@@ -317,7 +321,7 @@
        .catch(e => {
        })
    },
    editBookings(id) {
    editBookings (id) {
      bookingsDetail(id)
        .then(res => {
          this.$refs.operaBookingsWindow.open('编辑会议预约', res)
@@ -325,7 +329,7 @@
        .catch(e => {
        })
    },
    handlePageChange(pageIndex) {
    handlePageChange (pageIndex) {
      this.__checkApi()
      this.tableData.pagination.pageIndex = pageIndex || this.tableData.pagination.pageIndex
      this.isWorking.search = true