| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <!-- 页面标题 --> |
| | | <div class="page-header"> |
| | | <h2>会议室设置</h2> |
| | | <div> |
| | | <el-button @click="handleExport" style="margin-right: 10px">导出</el-button> |
| | | <el-button type="primary" @click="handleAdd"> |
| | | <el-icon><Plus /></el-icon> |
| | | 新增会议室 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 搜索区域 --> |
| | | <el-card class="search-card"> |
| | | <el-form :model="searchForm" label-width="100px" inline> |
| | | <el-form :model="searchForm" label-width="100px" class="search-form"> |
| | | <el-form-item label="会议室名称"> |
| | | <el-input v-model="searchForm.name" placeholder="请输入会议室名称" clearable /> |
| | | </el-form-item> |
| | |
| | | <el-button type="primary" @click="handleSearch">搜索</el-button> |
| | | <el-button @click="resetSearch">重置</el-button> |
| | | </el-form-item> |
| | | <el-form-item class="search-actions"> |
| | | <el-button @click="handleExport">导出</el-button> |
| | | <el-button type="primary" @click="handleAdd"> |
| | | <el-icon><Plus /></el-icon> |
| | | 新增会议室 |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <!-- 会议室列表 --> |
| | | <el-card> |
| | | <el-table v-loading="loading" :data="meetingRoomList" border> |
| | | <el-table v-loading="loading" :data="meetingRoomList" border :height="tableHeight"> |
| | | <el-table-column prop="name" label="会议室名称" align="center" /> |
| | | <el-table-column prop="location" label="位置" align="center" /> |
| | | <el-table-column prop="capacity" label="容纳人数" align="center" /> |
| | |
| | | |
| | | // 总条数 |
| | | const total = ref(0) |
| | | |
| | | // 表格高度(根据窗口高度自适应) |
| | | const tableHeight = ref(window.innerHeight - 380) |
| | | |
| | | // 会议室列表数据 |
| | | const meetingRoomList = ref([]) |
| | |
| | | padding: 20px; |
| | | } |
| | | |
| | | .search-form { |
| | | display: flex; |
| | | /* align-items: center; */ |
| | | } |
| | | |
| | | .search-actions { |
| | | margin-left: auto; |
| | | } |
| | | |
| | | .page-header { |
| | | display: flex; |
| | | justify-content: space-between; |