Room.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <template>
  2. <div class="page-container">
  3. <div class="page-header">
  4. <span class="breadcrumb-label">当前位置:</span>
  5. <span class="breadcrumb-path">院区信息管理</span>
  6. <span class="breadcrumb-separator">&gt;</span>
  7. <span class="breadcrumb-current">病房管理</span>
  8. </div>
  9. <!-- 查询栏 -->
  10. <div class="search-bar">
  11. <div class="search-item">
  12. <label>病房代码:</label>
  13. <input type="text" v-model="searchForm.code" placeholder="请输入病房代码" />
  14. </div>
  15. <div class="search-item">
  16. <label>所属科室:</label>
  17. <select v-model="searchForm.belongDept" @change="onDeptChange">
  18. <option value="">全部</option>
  19. <option v-for="(dept, index) in deptList" :key="index" :value="dept">{{ dept }}</option>
  20. </select>
  21. </div>
  22. <div class="search-item">
  23. <label>所属病区:</label>
  24. <select v-model="searchForm.belongWard">
  25. <option value="">全部</option>
  26. <option v-for="(ward, index) in wardList" :key="index" :value="ward">{{ ward }}</option>
  27. </select>
  28. </div>
  29. <div class="search-item">
  30. <label>是否启用:</label>
  31. <select v-model="searchForm.enabled">
  32. <option value="">全部</option>
  33. <option value="1">是</option>
  34. <option value="0">否</option>
  35. </select>
  36. </div>
  37. <button class="search-btn" @click="handleSearch">查询</button>
  38. <button class="reset-btn" @click="handleReset">重置</button>
  39. </div>
  40. <!-- 操作按钮 -->
  41. <div class="action-bar" v-if="isAdmin">
  42. <button class="code-set-btn" @click="openCodeSetting" :disabled="selectedRows.length === 0">
  43. 病房代码设置
  44. </button>
  45. </div>
  46. <!-- 数据列表 -->
  47. <div class="table-container">
  48. <div v-if="loading" class="loading-mask">
  49. <div class="loading-spinner"></div>
  50. <span>加载中...</span>
  51. </div>
  52. <table class="data-table" v-show="!loading">
  53. <thead>
  54. <tr>
  55. <th><input type="checkbox" :checked="selectAll" @change="handleSelectAll" /></th>
  56. <th>病房代码</th>
  57. <th>病房外部代码</th>
  58. <th>病房名称</th>
  59. <th>额定床位</th>
  60. <th>所属科室</th>
  61. <th>所属病区</th>
  62. <th>是否启用</th>
  63. <th>操作</th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. <tr v-for="item in tableData" :key="item.id">
  68. <td><input type="checkbox" :checked="isSelected(item)" @change="toggleSelect(item)" /></td>
  69. <td>{{ item.code }}</td>
  70. <td>{{ item.outCode }}</td>
  71. <td>{{ item.name }}</td>
  72. <td>{{ item.bedCount }}</td>
  73. <td>{{ item.belongDept }}</td>
  74. <td>{{ item.belongWard }}</td>
  75. <td>{{ item.enabled === 1 ? '是' : '否' }}</td>
  76. <td>
  77. <button class="detail-btn" @click="showDetail(item)">详情</button>
  78. </td>
  79. </tr>
  80. <tr v-if="tableData.length === 0">
  81. <td colspan="9" class="empty-tip">暂无数据</td>
  82. </tr>
  83. </tbody>
  84. </table>
  85. </div>
  86. <!-- 分页 -->
  87. <div class="pagination" v-if="total > 0">
  88. <span class="pagination-info">共 {{ total }} 条记录</span>
  89. <div class="pagination-controls">
  90. <button class="page-btn" :disabled="currentPage === 1" @click="changePage(1)">首页</button>
  91. <button class="page-btn" :disabled="currentPage === 1" @click="changePage(currentPage - 1)">上一页</button>
  92. <span class="page-numbers">
  93. <button
  94. v-for="page in displayPages"
  95. :key="page"
  96. class="page-num"
  97. :class="{ active: page === currentPage }"
  98. @click="changePage(page)"
  99. >{{ page }}</button>
  100. </span>
  101. <button class="page-btn" :disabled="currentPage === totalPages" @click="changePage(currentPage + 1)">下一页</button>
  102. <button class="page-btn" :disabled="currentPage === totalPages" @click="changePage(totalPages)">末页</button>
  103. <span class="page-size-selector">
  104. <select v-model="pageSize" @change="handlePageSizeChange">
  105. <option :value="10">10条/页</option>
  106. <option :value="20">20条/页</option>
  107. <option :value="50">50条/页</option>
  108. <option :value="100">100条/页</option>
  109. </select>
  110. </span>
  111. <span class="page-jump">
  112. 跳至 <input type="number" v-model.number="jumpPage" min="1" :max="totalPages" @keyup.enter="handleJumpPage" /> 页
  113. </span>
  114. </div>
  115. </div>
  116. <!-- 详情弹窗 -->
  117. <div class="modal-overlay" v-if="detailVisible" @click.self="detailVisible = false">
  118. <div class="modal-content">
  119. <div class="modal-header">
  120. <span>病房详情</span>
  121. <button class="close-btn" @click="detailVisible = false">×</button>
  122. </div>
  123. <div class="modal-body">
  124. <div class="detail-row">
  125. <span class="label">病房代码:</span>
  126. <span class="value">{{ currentRoom.code }}</span>
  127. </div>
  128. <div class="detail-row">
  129. <span class="label">病房外部代码:</span>
  130. <span class="value">{{ currentRoom.outCode }}</span>
  131. </div>
  132. <div class="detail-row">
  133. <span class="label">病房名称:</span>
  134. <span class="value">{{ currentRoom.name }}</span>
  135. </div>
  136. <div class="detail-row">
  137. <span class="label">额定床位:</span>
  138. <span class="value">{{ currentRoom.bedCount }}</span>
  139. </div>
  140. <div class="detail-row">
  141. <span class="label">所属科室:</span>
  142. <span class="value">{{ currentRoom.belongDept }}</span>
  143. </div>
  144. <div class="detail-row">
  145. <span class="label">所属病区:</span>
  146. <span class="value">{{ currentRoom.belongWard }}</span>
  147. </div>
  148. <div class="detail-row">
  149. <span class="label">排序号:</span>
  150. <span class="value">{{ currentRoom.sort }}</span>
  151. </div>
  152. <div class="detail-row">
  153. <span class="label">是否启用:</span>
  154. <span class="value">{{ currentRoom.enabled === 1 ? '是' : '否' }}</span>
  155. </div>
  156. <div class="detail-row">
  157. <span class="label">备注:</span>
  158. <span class="value">{{ currentRoom.remark }}</span>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. <!-- 病房代码设置弹窗 -->
  164. <div class="modal-overlay" v-if="codeSettingVisible" @click.self="codeSettingVisible = false">
  165. <div class="modal-content code-setting-modal">
  166. <div class="modal-header">
  167. <span>病房代码设置</span>
  168. <button class="close-btn" @click="codeSettingVisible = false">×</button>
  169. </div>
  170. <div class="modal-body">
  171. <table class="code-setting-table">
  172. <thead>
  173. <tr>
  174. <th>病房名称</th>
  175. <th>所属病区</th>
  176. <th>当前代码</th>
  177. <th>新代码</th>
  178. </tr>
  179. </thead>
  180. <tbody>
  181. <tr v-for="(item, index) in codeSettingList" :key="item.id">
  182. <td>{{ item.name }}</td>
  183. <td>{{ item.belongWard }}</td>
  184. <td>{{ item.code }}</td>
  185. <td>
  186. <input type="text" v-model="item.newCode" maxlength="4"
  187. placeholder="0001~9999" @blur="formatCodeInput(index)" />
  188. </td>
  189. </tr>
  190. </tbody>
  191. </table>
  192. <div class="code-tips">
  193. 提示:病房代码为0001~9999四位数字,输入1或101将自动补0变为0001与0101,同病区下代码不可重复
  194. </div>
  195. </div>
  196. <div class="modal-footer">
  197. <button class="cancel-btn" @click="codeSettingVisible = false">取消</button>
  198. <button class="confirm-btn" @click="saveCodeSetting">保存</button>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </template>
  204. <script setup>
  205. import { ref, reactive, computed, onMounted, watch } from 'vue'
  206. import request from '@/utils/request'
  207. // 判断是否为管理员
  208. const isAdmin = computed(() => {
  209. const userType = localStorage.getItem('userType')
  210. return userType === 'admin'
  211. })
  212. // 查询条件
  213. const searchForm = reactive({
  214. code: '',
  215. belongDept: '',
  216. belongWard: '',
  217. enabled: ''
  218. })
  219. // 科室列表和病区列表
  220. const deptList = ref([])
  221. const wardList = ref([])
  222. // 表格数据
  223. const tableData = ref([])
  224. // 加载状态
  225. const loading = ref(false)
  226. // 分页相关
  227. const currentPage = ref(1)
  228. const pageSize = ref(10)
  229. const total = ref(0)
  230. const jumpPage = ref(1)
  231. // 计算总页数
  232. const totalPages = computed(() => Math.ceil(total.value / pageSize.value) || 1)
  233. // 计算显示的页码
  234. const displayPages = computed(() => {
  235. const pages = []
  236. const maxShow = 5
  237. let start = Math.max(1, currentPage.value - Math.floor(maxShow / 2))
  238. let end = Math.min(totalPages.value, start + maxShow - 1)
  239. if (end - start + 1 < maxShow) {
  240. start = Math.max(1, end - maxShow + 1)
  241. }
  242. for (let i = start; i <= end; i++) {
  243. pages.push(i)
  244. }
  245. return pages
  246. })
  247. // 选中的行
  248. const selectedRows = ref([])
  249. const selectAll = computed({
  250. get: () => tableData.value.length > 0 && selectedRows.value.length === tableData.value.length,
  251. set: () => {}
  252. })
  253. // 详情弹窗
  254. const detailVisible = ref(false)
  255. const currentRoom = ref({})
  256. // 代码设置弹窗
  257. const codeSettingVisible = ref(false)
  258. const codeSettingList = ref([])
  259. onMounted(() => {
  260. loadDeptList()
  261. loadWardList()
  262. loadData()
  263. })
  264. // 加载所属科室列表
  265. const loadDeptList = async () => {
  266. try {
  267. const res = await request.get('/api/room/dept-list')
  268. if (res.code === 200) {
  269. deptList.value = res.data || []
  270. }
  271. } catch (error) {
  272. console.error('加载科室列表失败:', error)
  273. }
  274. }
  275. // 根据科室加载病区列表
  276. const loadWardList = async () => {
  277. try {
  278. const params = {}
  279. if (searchForm.belongDept) {
  280. params.belongDept = searchForm.belongDept
  281. }
  282. const res = await request.get('/api/room/ward-list', { params })
  283. if (res.code === 200) {
  284. wardList.value = res.data || []
  285. }
  286. } catch (error) {
  287. console.error('加载病区列表失败:', error)
  288. }
  289. }
  290. // 所属科室变化时,重新加载病区列表
  291. const onDeptChange = () => {
  292. searchForm.belongWard = ''
  293. loadWardList()
  294. }
  295. // 加载数据
  296. const loadData = async () => {
  297. loading.value = true
  298. try {
  299. const params = {
  300. page: currentPage.value,
  301. pageSize: pageSize.value
  302. }
  303. if (searchForm.code) params.code = searchForm.code
  304. if (searchForm.belongDept) params.belongDept = searchForm.belongDept
  305. if (searchForm.belongWard) params.belongWard = searchForm.belongWard
  306. if (searchForm.enabled !== '') params.enabled = searchForm.enabled
  307. const res = await request.get('/api/room/list', { params })
  308. if (res.code === 200) {
  309. tableData.value = res.data?.records || res.data || []
  310. total.value = res.data?.total || tableData.value.length
  311. selectedRows.value = []
  312. }
  313. } catch (error) {
  314. console.error('加载数据失败:', error)
  315. } finally {
  316. loading.value = false
  317. }
  318. }
  319. // 切换页码
  320. const changePage = (page) => {
  321. if (page >= 1 && page <= totalPages.value) {
  322. currentPage.value = page
  323. jumpPage.value = page
  324. loadData()
  325. }
  326. }
  327. // 修改每页条数
  328. const handlePageSizeChange = () => {
  329. currentPage.value = 1
  330. loadData()
  331. }
  332. // 跳转到指定页
  333. const handleJumpPage = () => {
  334. const page = Math.min(Math.max(1, jumpPage.value), totalPages.value)
  335. changePage(page)
  336. }
  337. // 判断是否选中
  338. const isSelected = (item) => {
  339. return selectedRows.value.some(row => row.id === item.id)
  340. }
  341. // 切换选中状态
  342. const toggleSelect = (item) => {
  343. const index = selectedRows.value.findIndex(row => row.id === item.id)
  344. if (index > -1) {
  345. selectedRows.value.splice(index, 1)
  346. } else {
  347. selectedRows.value.push(item)
  348. }
  349. }
  350. // 全选/取消全选
  351. const handleSelectAll = (e) => {
  352. if (e.target.checked) {
  353. selectedRows.value = [...tableData.value]
  354. } else {
  355. selectedRows.value = []
  356. }
  357. }
  358. // 查询
  359. const handleSearch = () => {
  360. currentPage.value = 1
  361. loadData()
  362. }
  363. // 重置
  364. const handleReset = () => {
  365. searchForm.code = ''
  366. searchForm.belongDept = ''
  367. searchForm.belongWard = ''
  368. searchForm.enabled = ''
  369. currentPage.value = 1
  370. loadWardList()
  371. loadData()
  372. }
  373. // 查看详情
  374. const showDetail = async (item) => {
  375. try {
  376. const res = await request.get(`/api/room/detail/${item.id}`)
  377. if (res.code === 200) {
  378. currentRoom.value = res.data
  379. detailVisible.value = true
  380. }
  381. } catch (error) {
  382. console.error('获取详情失败:', error)
  383. }
  384. }
  385. // 打开代码设置弹窗
  386. const openCodeSetting = () => {
  387. codeSettingList.value = selectedRows.value.map(item => ({
  388. id: item.id,
  389. name: item.name,
  390. belongWard: item.belongWard,
  391. code: item.code,
  392. newCode: item.code || ''
  393. }))
  394. codeSettingVisible.value = true
  395. }
  396. // 格式化代码输入
  397. const formatCodeInput = (index) => {
  398. let code = codeSettingList.value[index].newCode
  399. if (code) {
  400. code = code.replace(/\D/g, '')
  401. if (code) {
  402. let num = parseInt(code)
  403. if (num > 9999) num = 9999
  404. if (num < 0) num = 0
  405. codeSettingList.value[index].newCode = String(num).padStart(4, '0')
  406. }
  407. }
  408. }
  409. // 保存代码设置
  410. const saveCodeSetting = async () => {
  411. const ids = codeSettingList.value.map(item => item.id)
  412. const codes = codeSettingList.value.map(item => item.newCode)
  413. try {
  414. const res = await request.post('/api/room/batch-set-code', { ids, codes })
  415. if (res.code === 200) {
  416. if (res.errors && res.errors.length > 0) {
  417. alert('部分设置成功\n' + res.errors.join('\n'))
  418. } else {
  419. alert('设置成功')
  420. }
  421. codeSettingVisible.value = false
  422. loadData()
  423. } else {
  424. alert(res.message || '设置失败')
  425. }
  426. } catch (error) {
  427. console.error('设置失败:', error)
  428. alert('设置失败')
  429. }
  430. }
  431. </script>
  432. <style scoped>
  433. .page-container {
  434. background: #fff;
  435. border-radius: 8px;
  436. padding: 20px;
  437. }
  438. .page-header {
  439. border-bottom: 1px solid #eee;
  440. padding-bottom: 15px;
  441. margin-bottom: 20px;
  442. font-size: 14px;
  443. }
  444. .breadcrumb-label { color: #666; }
  445. .breadcrumb-path { color: #666; }
  446. .breadcrumb-separator { margin: 0 5px; color: #666; }
  447. .breadcrumb-current { color: #409eff; }
  448. /* 查询栏 */
  449. .search-bar {
  450. display: flex;
  451. align-items: center;
  452. gap: 15px;
  453. margin-bottom: 15px;
  454. padding: 15px;
  455. background: #f5f7fa;
  456. border-radius: 4px;
  457. }
  458. .search-item {
  459. display: flex;
  460. align-items: center;
  461. }
  462. .search-item label {
  463. margin-right: 8px;
  464. color: #666;
  465. font-size: 14px;
  466. white-space: nowrap;
  467. }
  468. .search-item input,
  469. .search-item select {
  470. padding: 8px 10px;
  471. border: 1px solid #dcdfe6;
  472. border-radius: 4px;
  473. font-size: 14px;
  474. }
  475. .search-item input { width: 120px; }
  476. .search-item select { width: 120px; }
  477. .search-btn {
  478. padding: 8px 20px;
  479. background: #409eff;
  480. color: #fff;
  481. border: none;
  482. border-radius: 4px;
  483. cursor: pointer;
  484. white-space: nowrap;
  485. }
  486. .search-btn:hover { background: #66b1ff; }
  487. .reset-btn {
  488. padding: 8px 20px;
  489. background: #fff;
  490. color: #666;
  491. border: 1px solid #dcdfe6;
  492. border-radius: 4px;
  493. cursor: pointer;
  494. white-space: nowrap;
  495. }
  496. .reset-btn:hover { border-color: #409eff; color: #409eff; }
  497. /* 操作按钮栏 */
  498. .action-bar {
  499. margin-bottom: 15px;
  500. }
  501. .code-set-btn {
  502. padding: 8px 20px;
  503. background: #67c23a;
  504. color: #fff;
  505. border: none;
  506. border-radius: 4px;
  507. cursor: pointer;
  508. }
  509. .code-set-btn:hover { background: #85ce61; }
  510. .code-set-btn:disabled {
  511. background: #c0c4cc;
  512. cursor: not-allowed;
  513. }
  514. /* 数据表格 */
  515. .table-container {
  516. overflow-x: auto;
  517. }
  518. .data-table {
  519. width: 100%;
  520. border-collapse: collapse;
  521. font-size: 14px;
  522. }
  523. .data-table th,
  524. .data-table td {
  525. padding: 12px;
  526. text-align: left;
  527. border-bottom: 1px solid #eee;
  528. }
  529. .data-table th {
  530. background: #f5f7fa;
  531. font-weight: 500;
  532. color: #333;
  533. }
  534. .data-table tbody tr:hover {
  535. background: #f5f7fa;
  536. }
  537. .empty-tip {
  538. text-align: center;
  539. color: #999;
  540. padding: 40px 0;
  541. }
  542. .detail-btn {
  543. padding: 4px 12px;
  544. background: #409eff;
  545. color: #fff;
  546. border: none;
  547. border-radius: 4px;
  548. cursor: pointer;
  549. font-size: 12px;
  550. }
  551. .detail-btn:hover { background: #66b1ff; }
  552. /* 加载状态 */
  553. .loading-mask {
  554. display: flex;
  555. flex-direction: column;
  556. align-items: center;
  557. justify-content: center;
  558. padding: 60px 0;
  559. color: #909399;
  560. }
  561. .loading-spinner {
  562. width: 32px;
  563. height: 32px;
  564. border: 3px solid #f3f3f3;
  565. border-top: 3px solid #409eff;
  566. border-radius: 50%;
  567. animation: spin 1s linear infinite;
  568. margin-bottom: 12px;
  569. }
  570. @keyframes spin {
  571. 0% { transform: rotate(0deg); }
  572. 100% { transform: rotate(360deg); }
  573. }
  574. /* 弹窗样式 */
  575. .modal-overlay {
  576. position: fixed;
  577. top: 0;
  578. left: 0;
  579. right: 0;
  580. bottom: 0;
  581. background: rgba(0, 0, 0, 0.5);
  582. display: flex;
  583. align-items: center;
  584. justify-content: center;
  585. z-index: 1000;
  586. }
  587. .modal-content {
  588. background: #fff;
  589. border-radius: 8px;
  590. min-width: 500px;
  591. max-width: 90%;
  592. max-height: 90%;
  593. overflow: hidden;
  594. }
  595. .code-setting-modal {
  596. min-width: 700px;
  597. }
  598. .modal-header {
  599. display: flex;
  600. justify-content: space-between;
  601. align-items: center;
  602. padding: 15px 20px;
  603. border-bottom: 1px solid #eee;
  604. font-size: 16px;
  605. font-weight: 500;
  606. }
  607. .close-btn {
  608. background: none;
  609. border: none;
  610. font-size: 20px;
  611. cursor: pointer;
  612. color: #999;
  613. }
  614. .close-btn:hover { color: #333; }
  615. .modal-body {
  616. padding: 20px;
  617. max-height: 60vh;
  618. overflow-y: auto;
  619. }
  620. .modal-footer {
  621. padding: 15px 20px;
  622. border-top: 1px solid #eee;
  623. display: flex;
  624. justify-content: flex-end;
  625. gap: 10px;
  626. }
  627. /* 详情行 */
  628. .detail-row {
  629. display: flex;
  630. padding: 10px 0;
  631. border-bottom: 1px solid #f0f0f0;
  632. }
  633. .detail-row .label {
  634. width: 120px;
  635. color: #666;
  636. flex-shrink: 0;
  637. }
  638. .detail-row .value {
  639. flex: 1;
  640. color: #333;
  641. }
  642. /* 代码设置表格 */
  643. .code-setting-table {
  644. width: 100%;
  645. border-collapse: collapse;
  646. font-size: 14px;
  647. }
  648. .code-setting-table th,
  649. .code-setting-table td {
  650. padding: 10px;
  651. text-align: left;
  652. border: 1px solid #eee;
  653. }
  654. .code-setting-table th {
  655. background: #f5f7fa;
  656. }
  657. .code-setting-table input {
  658. width: 100px;
  659. padding: 6px 10px;
  660. border: 1px solid #dcdfe6;
  661. border-radius: 4px;
  662. }
  663. .code-tips {
  664. margin-top: 15px;
  665. color: #999;
  666. font-size: 12px;
  667. }
  668. /* 按钮 */
  669. .cancel-btn {
  670. padding: 8px 20px;
  671. background: #fff;
  672. color: #666;
  673. border: 1px solid #dcdfe6;
  674. border-radius: 4px;
  675. cursor: pointer;
  676. }
  677. .cancel-btn:hover { border-color: #409eff; color: #409eff; }
  678. .confirm-btn {
  679. padding: 8px 20px;
  680. background: #409eff;
  681. color: #fff;
  682. border: none;
  683. border-radius: 4px;
  684. cursor: pointer;
  685. }
  686. .confirm-btn:hover { background: #66b1ff; }
  687. /* 分页样式 */
  688. .pagination {
  689. display: flex;
  690. justify-content: space-between;
  691. align-items: center;
  692. margin-top: 20px;
  693. padding: 15px 0;
  694. border-top: 1px solid #eee;
  695. }
  696. .pagination-info {
  697. color: #666;
  698. font-size: 14px;
  699. }
  700. .pagination-controls {
  701. display: flex;
  702. align-items: center;
  703. gap: 5px;
  704. }
  705. .page-btn {
  706. padding: 6px 12px;
  707. background: #fff;
  708. border: 1px solid #dcdfe6;
  709. border-radius: 4px;
  710. cursor: pointer;
  711. font-size: 13px;
  712. color: #606266;
  713. }
  714. .page-btn:hover:not(:disabled) {
  715. color: #409eff;
  716. border-color: #c6e2ff;
  717. }
  718. .page-btn:disabled {
  719. color: #c0c4cc;
  720. cursor: not-allowed;
  721. }
  722. .page-numbers {
  723. display: flex;
  724. gap: 5px;
  725. }
  726. .page-num {
  727. min-width: 32px;
  728. height: 28px;
  729. padding: 0 6px;
  730. background: #fff;
  731. border: 1px solid #dcdfe6;
  732. border-radius: 4px;
  733. cursor: pointer;
  734. font-size: 13px;
  735. color: #606266;
  736. }
  737. .page-num:hover {
  738. color: #409eff;
  739. border-color: #c6e2ff;
  740. }
  741. .page-num.active {
  742. background: #409eff;
  743. border-color: #409eff;
  744. color: #fff;
  745. }
  746. .page-size-selector select {
  747. padding: 5px 10px;
  748. border: 1px solid #dcdfe6;
  749. border-radius: 4px;
  750. font-size: 13px;
  751. margin-left: 10px;
  752. }
  753. .page-jump {
  754. font-size: 13px;
  755. color: #606266;
  756. margin-left: 10px;
  757. }
  758. .page-jump input {
  759. width: 50px;
  760. padding: 5px;
  761. border: 1px solid #dcdfe6;
  762. border-radius: 4px;
  763. text-align: center;
  764. margin: 0 5px;
  765. }
  766. </style>