|  |  | 
 |  |  | <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"> | 
 |  |  | 
 |  |  |     </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', | 
 |  |  |       ]"> | 
 |  |  | 
 |  |  |             @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 }"> | 
 |  |  | 
 |  |  |           </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 }"> | 
 |  |  | 
 |  |  |   name: 'Bookings', | 
 |  |  |   extends: BaseTable, | 
 |  |  |   components: { TableLayout, Pagination, OperaBookingsWindow, OperaBookingsDetailWindow }, | 
 |  |  |   data() { | 
 |  |  |   data () { | 
 |  |  |     return { | 
 |  |  |       date: [], | 
 |  |  |       // userInfo: this.$store.state.userInfo, | 
 |  |  | 
 |  |  |       link: 'https://dmtest.ahapp.net/meeting_h5/' // H5_LINK_ADDR | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  |   provide() { | 
 |  |  |   provide () { | 
 |  |  |     return { | 
 |  |  |       rooms: () => this.rooms | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  |   created() { | 
 |  |  |   created () { | 
 |  |  |     this.config({ | 
 |  |  |       module: '会议室预定信息表', | 
 |  |  |       api: '/meeting/bookings', | 
 |  |  | 
 |  |  |     this.changeRadio('0') | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     changeRadio(e) { | 
 |  |  |     changeRadio (e) { | 
 |  |  |       if (e === '0') { | 
 |  |  |         this.searchForm.startTime = timeForMat(0)[0] | 
 |  |  |         this.searchForm.endTime = timeForMat(0)[1] | 
 |  |  | 
 |  |  |       } | 
 |  |  |       this.search() | 
 |  |  |     }, | 
 |  |  |     newTree(tree) { | 
 |  |  |     newTree (tree) { | 
 |  |  |       if (tree == null) { | 
 |  |  |         return [] | 
 |  |  |       } | 
 |  |  | 
 |  |  |         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 = '' | 
 |  |  | 
 |  |  |       // 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(() => { | 
 |  |  | 
 |  |  |         .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('会议已开始') | 
 |  |  | 
 |  |  |             }) | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  |     handleEnd(row) { | 
 |  |  |     handleEnd (row) { | 
 |  |  |       this.$dialog.messageWaring('结束会议', '是否结束当前会议?') | 
 |  |  |         .then(() => { | 
 |  |  |           meetingEndById({ id: row.id }) | 
 |  |  | 
 |  |  |             }) | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  |     cancelMeeting(id) { | 
 |  |  |     cancelMeeting (id) { | 
 |  |  |       this.$dialog.messageWaring('取消会议', '是否取消当前会议?') | 
 |  |  |         .then(() => { | 
 |  |  |           cancelById({ id }) | 
 |  |  | 
 |  |  |             }) | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  |     showDetail(id) { | 
 |  |  |     showDetail (id) { | 
 |  |  |       bookingsDetail(id) | 
 |  |  |         .then(res => { | 
 |  |  |           this.$refs.operaBookingsDetailWindow.open('会议详情', res) | 
 |  |  | 
 |  |  |         .catch(e => { | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  |     editBookings(id) { | 
 |  |  |     editBookings (id) { | 
 |  |  |       bookingsDetail(id) | 
 |  |  |         .then(res => { | 
 |  |  |           this.$refs.operaBookingsWindow.open('编辑会议预约', res) | 
 |  |  | 
 |  |  |         .catch(e => { | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  |     handlePageChange(pageIndex) { | 
 |  |  |     handlePageChange (pageIndex) { | 
 |  |  |       this.__checkApi() | 
 |  |  |       this.tableData.pagination.pageIndex = pageIndex || this.tableData.pagination.pageIndex | 
 |  |  |       this.isWorking.search = true |