|  |  | 
 |  |  | <template> | 
 |  |  |   <TableLayout :permissions="['business:bookings:query']"> | 
 |  |  |     <!-- 搜索表单 --> | 
 |  |  |     <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> | 
 |  |  |     <el-form | 
 |  |  |       ref="searchForm" | 
 |  |  |       slot="search-form" | 
 |  |  |       :model="searchForm" | 
 |  |  |       label-width="100px" | 
 |  |  |       inline | 
 |  |  |     > | 
 |  |  |       <el-form-item label="会议室" prop="roomId"> | 
 |  |  |         <el-select | 
 |  |  |           v-model="searchForm.roomId" | 
 |  |  | 
 |  |  |           clearable | 
 |  |  |           placeholder="请选择会议室" | 
 |  |  |         > | 
 |  |  |           <el-option v-for="item in rooms" :key="item.id" :value="item.id" :label="item.name" /> | 
 |  |  |           <el-option | 
 |  |  |             v-for="item in rooms" | 
 |  |  |             :key="item.id" | 
 |  |  |             :value="item.id" | 
 |  |  |             :label="item.name" | 
 |  |  |           /> | 
 |  |  |         </el-select> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="预约部门" prop="department"> | 
 |  |  | 
 |  |  |         </el-select> --> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="会议主题" prop="name"> | 
 |  |  |         <el-input v-model="searchForm.name" placeholder="请输入会议主题" @keypress.enter.native="search"></el-input> | 
 |  |  |         <el-input | 
 |  |  |           v-model="searchForm.name" | 
 |  |  |           placeholder="请输入会议主题" | 
 |  |  |           @keypress.enter.native="search" | 
 |  |  |         ></el-input> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="预约人" prop="realName"> | 
 |  |  |         <el-input v-model="searchForm.realName" placeholder="请输入预约人" @keypress.enter.native="search"></el-input> | 
 |  |  |         <el-input | 
 |  |  |           v-model="searchForm.realName" | 
 |  |  |           placeholder="请输入预约人" | 
 |  |  |           @keypress.enter.native="search" | 
 |  |  |         ></el-input> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="会议状态" prop="status"> | 
 |  |  |         <el-select | 
 |  |  |           v-model="searchForm.status" | 
 |  |  |           v-model="searchForm.meetingStatus" | 
 |  |  |           filterable | 
 |  |  |           clearable | 
 |  |  |           placeholder="请选择状态" | 
 |  |  |         > | 
 |  |  |           <el-option v-for="item in status" :key="item.id" :value="item.id" :label="item.name" /> | 
 |  |  |           <el-option | 
 |  |  |             v-for="item in status" | 
 |  |  |             :key="item.id" | 
 |  |  |             :value="item.id" | 
 |  |  |             :label="item.name" | 
 |  |  |           /> | 
 |  |  |         </el-select> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="起止时间" prop="startTime"> | 
 |  |  | 
 |  |  |           type="datetimerange" | 
 |  |  |           range-separator="至" | 
 |  |  |           value-format="yyyy-MM-dd HH:mm:ss" | 
 |  |  |           :default-time="['00:00:00', '23:59:59']" | 
 |  |  |           start-placeholder="开始时间" | 
 |  |  |           end-placeholder="结束时间" | 
 |  |  |           @change="selectDate" | 
 |  |  | 
 |  |  |     </el-form> | 
 |  |  |     <!-- 表格和分页 --> | 
 |  |  |     <template v-slot:table-wrap> | 
 |  |  |       <ul class="toolbar" v-permissions="['business:bookings:create', 'business:bookings:exportExcel']"> | 
 |  |  |         <li><el-button type="primary" @click="$refs.operaBookingsWindow.open('新建会议')" v-permissions="['business:bookings:create']">新建</el-button></li> | 
 |  |  |       <ul | 
 |  |  |         class="toolbar" | 
 |  |  |         v-permissions="[ | 
 |  |  |           'business:bookings:create', | 
 |  |  |           'business:bookings:exportExcel', | 
 |  |  |         ]" | 
 |  |  |       > | 
 |  |  |         <li> | 
 |  |  |           <el-button | 
 |  |  |             type="primary" | 
 |  |  |             @click="$refs.operaBookingsWindow.open('新建会议')" | 
 |  |  |             v-permissions="['business:bookings:create']" | 
 |  |  |             >新建</el-button | 
 |  |  |           > | 
 |  |  |         </li> | 
 |  |  |         <!-- <li><el-button @click="deleteByIdInBatch" v-permissions="['business:bookings:delete']">删除</el-button></li> --> | 
 |  |  |         <li><el-button :loading="isWorking.export" v-permissions="['business:bookings:exportExcel']" @click="exportExcel">导出</el-button></li> | 
 |  |  |         <li> | 
 |  |  |           <el-button | 
 |  |  |             :loading="isWorking.export" | 
 |  |  |             v-permissions="['business:bookings:exportExcel']" | 
 |  |  |             @click="exportExcel" | 
 |  |  |             >导出</el-button | 
 |  |  |           > | 
 |  |  |         </li> | 
 |  |  |       </ul> | 
 |  |  |       <el-table | 
 |  |  |         v-loading="isWorking.search" | 
 |  |  | 
 |  |  |         @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}"> | 
 |  |  |         <el-table-column | 
 |  |  |           prop="name" | 
 |  |  |           label="会议主题" | 
 |  |  |           align="center" | 
 |  |  |           min-width="120px" | 
 |  |  |           show-overflow-tooltip | 
 |  |  |         > | 
 |  |  |           <template slot-scope="{ row }"> | 
 |  |  |             <span class="long-title-style">{{ row.name }}</span> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |         <el-table-column prop="roomName" label="会议室" align="center" min-width="120px" show-overflow-tooltip> | 
 |  |  |           <template slot-scope="{row}"> | 
 |  |  |         <el-table-column | 
 |  |  |           prop="roomName" | 
 |  |  |           label="会议室" | 
 |  |  |           align="center" | 
 |  |  |           min-width="120px" | 
 |  |  |           show-overflow-tooltip | 
 |  |  |         > | 
 |  |  |           <template slot-scope="{ row }"> | 
 |  |  |             <span class="long-title-style">{{ row.roomName }}</span> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |         <el-table-column prop="meetingTime" label="会议时间" align="center" min-width="120px"></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}"> | 
 |  |  |             <span v-if="row.status==0" style="color:rgb(127, 178, 53)">正常</span> | 
 |  |  |             <span v-else style="color:rgb(234, 54, 38)">取消</span> | 
 |  |  |         <el-table-column | 
 |  |  |           prop="meetingTime" | 
 |  |  |           label="会议时间" | 
 |  |  |           align="center" | 
 |  |  |           min-width="120px" | 
 |  |  |         ></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 }"> | 
 |  |  |             <span v-if="row.meetingStatus == 1">未开始</span> | 
 |  |  |             <span v-if="row.meetingStatus == 2">进行中</span> | 
 |  |  |             <span v-if="row.meetingStatus == 3">已结束</span> | 
 |  |  |             <span v-if="row.meetingStatus == 4">即将开始</span> | 
 |  |  |             <span v-if="row.meetingStatus == 5">已撤销</span> | 
 |  |  |             <!-- {{ row.status==0 ? '正常' : '取消' }} --> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |         <el-table-column prop="createDate" label="创建时间" align="center" min-width="100px"></el-table-column> | 
 |  |  |         <el-table-column | 
 |  |  |           prop="createDate" | 
 |  |  |           label="创建时间" | 
 |  |  |           align="center" | 
 |  |  |           min-width="150px" | 
 |  |  |         ></el-table-column> | 
 |  |  |         <!-- <el-table-column prop="content" label="会议内容" min-width="100px"></el-table-column> --> | 
 |  |  |         <el-table-column | 
 |  |  |           v-if="containPermissions(['business:bookings:update', 'business:bookings:delete'])" | 
 |  |  |           v-if=" | 
 |  |  |             containPermissions([ | 
 |  |  |               'business:bookings:update', | 
 |  |  |               'business:bookings:delete', | 
 |  |  |             ]) | 
 |  |  |           " | 
 |  |  |           label="操作" | 
 |  |  |           min-width="120" | 
 |  |  |           min-width="100" | 
 |  |  |           align="center" | 
 |  |  |           fixed="right" | 
 |  |  |         > | 
 |  |  |           <template slot-scope="{row}"> | 
 |  |  |             <template v-if="row.status==0"> | 
 |  |  |               <el-button type="text" @click="$refs.operaBookingsDetailWindow.open('会议详情', row)">查看</el-button> | 
 |  |  |               <el-button v-if="row.flag == 0" type="text" @click="$refs.operaBookingsWindow.open('编辑会议预约', row)" v-permissions="['business:bookings:update']">修改</el-button> | 
 |  |  |               <el-button type="text" @click="copy(row)">复制</el-button> | 
 |  |  |               <el-button v-if="row.flag == 0"  type="text" @click="cancelMeeting(row.id)" v-permissions="['business:bookings:update']">取消</el-button> | 
 |  |  |           <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" @click="copy(row)">复制</el-button> --> | 
 |  |  |               <el-button v-if="row.meetingStatus == '1'"  type="text" @click="cancelMeeting(row.id)" v-permissions="['business:bookings:update']">撤回</el-button> | 
 |  |  |             </template> | 
 |  |  |             <el-button v-else type="text" @click="deleteById(row)" v-permissions="['business:bookings:delete']">删除</el-button> | 
 |  |  |             <!-- <el-button v-else type="text" @click="deleteById(row)" v-permissions="['business:bookings:delete']">删除</el-button> --> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |       </el-table> | 
 |  |  | 
 |  |  |       </pagination> | 
 |  |  |     </template> | 
 |  |  |     <!-- 新建/修改 --> | 
 |  |  |     <OperaBookingsWindow ref="operaBookingsWindow" @success="handlePageChange"/> | 
 |  |  |     <OperaBookingsDetailWindow ref="operaBookingsDetailWindow"/> | 
 |  |  |     <OperaBookingsWindow | 
 |  |  |       ref="operaBookingsWindow" | 
 |  |  |       @success="handlePageChange" | 
 |  |  |     /> | 
 |  |  |     <OperaBookingsDetailWindow | 
 |  |  |       @success="search" | 
 |  |  |       ref="operaBookingsDetailWindow" | 
 |  |  |     /> | 
 |  |  |  | 
 |  |  |   </TableLayout> | 
 |  |  | </template> | 
 |  |  |  | 
 |  |  | 
 |  |  |         // departmentId: [], | 
 |  |  |         department: [], | 
 |  |  |         realName: '', | 
 |  |  |         status: '', | 
 |  |  |         meetingStatus: '', | 
 |  |  |         createDate: '', | 
 |  |  |         editor: '', | 
 |  |  |         editDate: '', | 
 |  |  | 
 |  |  |         { name: '开发部门', id: '0' } | 
 |  |  |       ], | 
 |  |  |       status: [ | 
 |  |  |         { name: '全部', id: '' }, | 
 |  |  |         { name: '正常', id: '0' }, | 
 |  |  |         { name: '取消', id: '1' } | 
 |  |  |         { name: '未开始', id: 1 }, | 
 |  |  |         { name: '即将开始', id: 4 }, | 
 |  |  |         { name: '进行中', id: 2 }, | 
 |  |  |         { name: '已撤销', id: 5 }, | 
 |  |  |         { name: '已结束', id: 3 } | 
 |  |  |       ], | 
 |  |  |       link: 'https://dmtest.ahapp.net/meeting_h5/' // H5_LINK_ADDR | 
 |  |  |     } | 
 |  |  | 
 |  |  |       if (e === '0') { | 
 |  |  |         this.searchForm.startTime = timeForMat(0)[0] | 
 |  |  |         this.searchForm.endTime = timeForMat(0)[1] | 
 |  |  |         this.time = timeForMat(0) | 
 |  |  |         this.date = timeForMat(0) | 
 |  |  |       } else if (e === '1') { | 
 |  |  |         this.searchForm.startTime = timeForMat(6)[0] | 
 |  |  |         this.searchForm.endTime = timeForMat(6)[1] | 
 |  |  |         this.time = timeForMat(6) | 
 |  |  |         this.date = timeForMat(6) | 
 |  |  |       } else if (e === '2') { | 
 |  |  |         this.searchForm.startTime = timeForMat(29)[0] | 
 |  |  |         this.searchForm.endTime = timeForMat(29)[1] | 
 |  |  |         this.time = timeForMat(29) | 
 |  |  |         this.date = timeForMat(29) | 
 |  |  |       } | 
 |  |  |       this.search() | 
 |  |  |     }, | 
 |  |  | 
 |  |  |       this.searchForm.radio = '0' | 
 |  |  |       this.searchForm.startTime = '' | 
 |  |  |       this.searchForm.endTime = '' | 
 |  |  |       this.search() | 
 |  |  |       this.changeRadio('0') | 
 |  |  |     }, | 
 |  |  |     copy (row) { | 
 |  |  |       const text = `${row.realName} 邀请您加入会议\n会议主题:${row.name}\n会议室:${row.roomName}\n会议时间:${row.meetingTime}\n点击链接直接加入会议:\n${this.link}?id=${row.id}` | 
 |  |  | 
 |  |  |           this.$message.success('会议信息复制成功,去分享给同事吧~') | 
 |  |  |         }) | 
 |  |  |         .catch(e => { | 
 |  |  |           this.$message.error(e) | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  |     cancelMeeting (id) { | 
 |  |  | 
 |  |  |               this.handlePageChange() | 
 |  |  |             }) | 
 |  |  |             .catch(e => { | 
 |  |  |               this.$message.error(e) | 
 |  |  |             }) | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  | 
 |  |  |           this.$refs.operaBookingsDetailWindow.open('会议详情', res) | 
 |  |  |         }) | 
 |  |  |         .catch(e => { | 
 |  |  |           this.$message.error(e) | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  |     editBookings (id) { | 
 |  |  | 
 |  |  |           this.$refs.operaBookingsWindow.open('编辑会议预约', res) | 
 |  |  |         }) | 
 |  |  |         .catch(e => { | 
 |  |  |           this.$message.error(e) | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  |     handlePageChange (pageIndex) { | 
 |  |  | 
 |  |  |           this.tableData.pagination.total = data.total | 
 |  |  |         }) | 
 |  |  |         .catch(e => { | 
 |  |  |           this.$tip.apiFailed(e) | 
 |  |  |           // this.$tip.apiFailed(e) | 
 |  |  |         }) | 
 |  |  |         .finally(() => { | 
 |  |  |           this.isWorking.search = false | 
 |  |  | 
 |  |  |   } | 
 |  |  | } | 
 |  |  | </script> | 
 |  |  |  | 
 |  |  | <style lang="scss" scoped> | 
 |  |  | .detail_modal { | 
 |  |  |   padding: 20px 16px; | 
 |  |  |   .title { | 
 |  |  |     text-align: center; | 
 |  |  |     font-weight: 600; | 
 |  |  |     font-size: 16px; | 
 |  |  |     margin-bottom: 20px; | 
 |  |  |   } | 
 |  |  |   .h1 { | 
 |  |  |     font-weight: 600; | 
 |  |  |     font-size: 16px; | 
 |  |  |     margin-bottom: 15px; | 
 |  |  |   } | 
 |  |  |   .line { | 
 |  |  |     display: flex; | 
 |  |  |     margin-bottom: 10px; | 
 |  |  |     .label { | 
 |  |  |       width: 70px; | 
 |  |  |       color: #888888; | 
 |  |  |     } | 
 |  |  |     .value { | 
 |  |  |       color: #333333; | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } | 
 |  |  | </style> |