feat(rebate): 返利列表页面功能增强和样式优化
- 添加表格行选择功能,支持单选和全选 - 优化分页组件,增加每页条数选择器 - 更新表格样式,改善视觉效果和响应式布局 - 修改搜索区域和操作按钮样式,统一设计风格 - 调整详情按钮样式,增加图标标识 - 修复分页跳转逻辑,确保页码正确更新 - 优化表格空数据显示和列宽适配
Showing
1 changed file
with
301 additions
and
243 deletions
| ... | @@ -136,6 +136,14 @@ | ... | @@ -136,6 +136,14 @@ |
| 136 | <table class="data-table"> | 136 | <table class="data-table"> |
| 137 | <thead> | 137 | <thead> |
| 138 | <tr> | 138 | <tr> |
| 139 | + <th class="checkbox-col"> | ||
| 140 | + <input | ||
| 141 | + type="checkbox" | ||
| 142 | + :checked="selectAll" | ||
| 143 | + @change="handleSelectAll" | ||
| 144 | + class="table-checkbox" | ||
| 145 | + /> | ||
| 146 | + </th> | ||
| 139 | <th>返利编号</th> | 147 | <th>返利编号</th> |
| 140 | <th>订单编号</th> | 148 | <th>订单编号</th> |
| 141 | <th>经销商代码</th> | 149 | <th>经销商代码</th> |
| ... | @@ -151,9 +159,17 @@ | ... | @@ -151,9 +159,17 @@ |
| 151 | </thead> | 159 | </thead> |
| 152 | <tbody> | 160 | <tbody> |
| 153 | <tr v-if="rebateList.length === 0"> | 161 | <tr v-if="rebateList.length === 0"> |
| 154 | - <td colspan="11" class="empty-data">暂无数据</td> | 162 | + <td colspan="12" class="empty-data">暂无数据</td> |
| 155 | </tr> | 163 | </tr> |
| 156 | <tr v-for="row in rebateList" :key="row.rebateId"> | 164 | <tr v-for="row in rebateList" :key="row.rebateId"> |
| 165 | + <td class="checkbox-col"> | ||
| 166 | + <input | ||
| 167 | + type="checkbox" | ||
| 168 | + :checked="selectedRebates.includes(row)" | ||
| 169 | + @change="handleSelectRebate(row)" | ||
| 170 | + class="table-checkbox" | ||
| 171 | + /> | ||
| 172 | + </td> | ||
| 157 | <td>{{ row.rebateNo }}</td> | 173 | <td>{{ row.rebateNo }}</td> |
| 158 | <td>{{ row.orderNo }}</td> | 174 | <td>{{ row.orderNo }}</td> |
| 159 | <td>{{ row.dealerCode }}</td> | 175 | <td>{{ row.dealerCode }}</td> |
| ... | @@ -173,7 +189,7 @@ | ... | @@ -173,7 +189,7 @@ |
| 173 | </td> | 189 | </td> |
| 174 | <td>{{ formatDate(row.updateTime || '') }}</td> | 190 | <td>{{ formatDate(row.updateTime || '') }}</td> |
| 175 | <td> | 191 | <td> |
| 176 | - <button @click="handleViewDetail(row)" class="action-link">详情</button> | 192 | + <button @click="handleViewDetail(row)" class="table-btn view">✏️ 详情</button> |
| 177 | </td> | 193 | </td> |
| 178 | </tr> | 194 | </tr> |
| 179 | </tbody> | 195 | </tbody> |
| ... | @@ -181,30 +197,46 @@ | ... | @@ -181,30 +197,46 @@ |
| 181 | </div> | 197 | </div> |
| 182 | 198 | ||
| 183 | <!-- 分页 --> | 199 | <!-- 分页 --> |
| 184 | - <div class="pagination-wrapper"> | 200 | + <div class="table-footer"> |
| 201 | + <div class="pagination-left"> | ||
| 185 | <div class="pagination-info"> | 202 | <div class="pagination-info"> |
| 186 | - 共 {{ pagination.total }} 条,{{ pagination.pageSize }}/页 | 203 | + 共 {{ pagination.total }} 条记录,第 {{ pagination.pageNum }} / {{ getTotalPages() }} 页 |
| 204 | + </div> | ||
| 205 | + <div class="page-size-selector"> | ||
| 206 | + <label>每页显示:</label> | ||
| 207 | + <select v-model="pagination.pageSize" @change="handleSizeChange($event)" class="page-size-select"> | ||
| 208 | + <option value="10">10条</option> | ||
| 209 | + <option value="20">20条</option> | ||
| 210 | + <option value="50">50条</option> | ||
| 211 | + <option value="100">100条</option> | ||
| 212 | + </select> | ||
| 213 | + </div> | ||
| 187 | </div> | 214 | </div> |
| 188 | - <div class="pagination-controls"> | 215 | + <div class="pagination-container"> |
| 189 | - <button @click="handlePrevPage" :disabled="pagination.pageNum <= 1" class="page-btn">‹</button> | 216 | + <button |
| 217 | + @click="handlePrevPage" | ||
| 218 | + :disabled="pagination.pageNum <= 1" | ||
| 219 | + class="pagination-btn prev-btn" | ||
| 220 | + > | ||
| 221 | + 上一页 | ||
| 222 | + </button> | ||
| 223 | + <div class="pagination-pages"> | ||
| 190 | <button | 224 | <button |
| 191 | v-for="page in getPageNumbers()" | 225 | v-for="page in getPageNumbers()" |
| 192 | :key="page" | 226 | :key="page" |
| 193 | @click="handlePageChange(page)" | 227 | @click="handlePageChange(page)" |
| 194 | - :class="['page-btn', { active: page === pagination.pageNum }]" | 228 | + :class="['page-number', { active: page === pagination.pageNum }]" |
| 195 | > | 229 | > |
| 196 | {{ page }} | 230 | {{ page }} |
| 197 | </button> | 231 | </button> |
| 198 | - <button @click="handleNextPage" :disabled="pagination.pageNum >= getTotalPages()" class="page-btn">›</button> | ||
| 199 | </div> | 232 | </div> |
| 200 | - <div class="pagination-jump"> | 233 | + <button |
| 201 | - 前往 | 234 | + @click="handleNextPage" |
| 202 | - <input | 235 | + :disabled="pagination.pageNum >= getTotalPages()" |
| 203 | - v-model="jumpPage" | 236 | + class="pagination-btn next-btn" |
| 204 | - class="jump-input" | 237 | + > |
| 205 | - @keyup.enter="handleJumpPage" | 238 | + 下一页 |
| 206 | - /> | 239 | + </button> |
| 207 | - 页 | ||
| 208 | </div> | 240 | </div> |
| 209 | </div> | 241 | </div> |
| 210 | </div> | 242 | </div> |
| ... | @@ -421,6 +453,7 @@ const exportLoading = ref(false) | ... | @@ -421,6 +453,7 @@ const exportLoading = ref(false) |
| 421 | const auditLoading = ref(false) | 453 | const auditLoading = ref(false) |
| 422 | const rebateList = ref<Rebate[]>([]) | 454 | const rebateList = ref<Rebate[]>([]) |
| 423 | const selectedRebates = ref<Rebate[]>([]) | 455 | const selectedRebates = ref<Rebate[]>([]) |
| 456 | +const selectAll = ref(false) | ||
| 424 | const rebateDetail = ref<Rebate | null>(null) | 457 | const rebateDetail = ref<Rebate | null>(null) |
| 425 | 458 | ||
| 426 | // 图表引用 | 459 | // 图表引用 |
| ... | @@ -872,8 +905,9 @@ const getCalcFlagClass = (flag: number) => { | ... | @@ -872,8 +905,9 @@ const getCalcFlagClass = (flag: number) => { |
| 872 | } | 905 | } |
| 873 | 906 | ||
| 874 | // 分页变化 | 907 | // 分页变化 |
| 875 | -const handleSizeChange = (size: number) => { | 908 | +const handleSizeChange = (event: Event) => { |
| 876 | - pagination.pageSize = size | 909 | + const target = event.target as HTMLSelectElement |
| 910 | + pagination.pageSize = parseInt(target.value) | ||
| 877 | pagination.pageNum = 1 | 911 | pagination.pageNum = 1 |
| 878 | getRebateList() | 912 | getRebateList() |
| 879 | } | 913 | } |
| ... | @@ -898,6 +932,27 @@ const handleSelectionChange = (selection: Rebate[]) => { | ... | @@ -898,6 +932,27 @@ const handleSelectionChange = (selection: Rebate[]) => { |
| 898 | selectedRebates.value = selection | 932 | selectedRebates.value = selection |
| 899 | } | 933 | } |
| 900 | 934 | ||
| 935 | +// 全选/取消全选 | ||
| 936 | +const handleSelectAll = () => { | ||
| 937 | + if (selectAll.value) { | ||
| 938 | + selectedRebates.value = [...rebateList.value] | ||
| 939 | + } else { | ||
| 940 | + selectedRebates.value = [] | ||
| 941 | + } | ||
| 942 | +} | ||
| 943 | + | ||
| 944 | +// 选择单个返利记录 | ||
| 945 | +const handleSelectRebate = (rebate: Rebate) => { | ||
| 946 | + const index = selectedRebates.value.findIndex(r => r.rebateId === rebate.rebateId) | ||
| 947 | + if (index > -1) { | ||
| 948 | + selectedRebates.value.splice(index, 1) | ||
| 949 | + } else { | ||
| 950 | + selectedRebates.value.push(rebate) | ||
| 951 | + } | ||
| 952 | + // 更新全选状态 | ||
| 953 | + selectAll.value = selectedRebates.value.length === rebateList.value.length && rebateList.value.length > 0 | ||
| 954 | +} | ||
| 955 | + | ||
| 901 | // 查看详情 | 956 | // 查看详情 |
| 902 | const handleViewDetail = async (row: Rebate) => { | 957 | const handleViewDetail = async (row: Rebate) => { |
| 903 | try { | 958 | try { |
| ... | @@ -1588,170 +1643,132 @@ onMounted(async () => { | ... | @@ -1588,170 +1643,132 @@ onMounted(async () => { |
| 1588 | 1643 | ||
| 1589 | <style scoped lang="scss"> | 1644 | <style scoped lang="scss"> |
| 1590 | .rebate-page { | 1645 | .rebate-page { |
| 1591 | - padding: 20px; | 1646 | + background: #f5f5f5; |
| 1592 | - background: #f5f7fa; | ||
| 1593 | min-height: 100vh; | 1647 | min-height: 100vh; |
| 1594 | - | ||
| 1595 | } | 1648 | } |
| 1596 | 1649 | ||
| 1650 | +/* 搜索区域 */ | ||
| 1597 | .search-section { | 1651 | .search-section { |
| 1598 | background: white; | 1652 | background: white; |
| 1599 | - padding: 16px 20px; | 1653 | + padding: 16px; |
| 1600 | - margin-bottom: 16px; | 1654 | + border-bottom: 1px solid #e0e0e0; |
| 1601 | - border-radius: 4px; | 1655 | +} |
| 1602 | - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); | ||
| 1603 | 1656 | ||
| 1604 | - .search-row { | 1657 | +.search-row { |
| 1605 | display: flex; | 1658 | display: flex; |
| 1659 | + gap: 16px; | ||
| 1606 | align-items: center; | 1660 | align-items: center; |
| 1607 | - gap: 24px; | ||
| 1608 | flex-wrap: wrap; | 1661 | flex-wrap: wrap; |
| 1609 | margin-bottom: 12px; | 1662 | margin-bottom: 12px; |
| 1663 | +} | ||
| 1610 | 1664 | ||
| 1611 | - &:last-child { | 1665 | +.search-row:last-child { |
| 1612 | margin-bottom: 0; | 1666 | margin-bottom: 0; |
| 1613 | - } | 1667 | +} |
| 1614 | 1668 | ||
| 1615 | - .search-item { | 1669 | +.search-item { |
| 1616 | display: flex; | 1670 | display: flex; |
| 1617 | align-items: center; | 1671 | align-items: center; |
| 1618 | gap: 8px; | 1672 | gap: 8px; |
| 1673 | +} | ||
| 1619 | 1674 | ||
| 1620 | - label { | 1675 | +.search-item label { |
| 1621 | - font-size: 14px; | 1676 | + font-size: 12px; |
| 1622 | color: #333; | 1677 | color: #333; |
| 1623 | white-space: nowrap; | 1678 | white-space: nowrap; |
| 1624 | - min-width: 80px; | 1679 | +} |
| 1625 | - } | ||
| 1626 | - | ||
| 1627 | - .search-input { | ||
| 1628 | - padding: 8px 12px; | ||
| 1629 | - border: 1px solid #ddd; | ||
| 1630 | - border-radius: 4px; | ||
| 1631 | - font-size: 14px; | ||
| 1632 | - width: 160px; | ||
| 1633 | - transition: border-color 0.3s; | ||
| 1634 | - | ||
| 1635 | - &:focus { | ||
| 1636 | - outline: none; | ||
| 1637 | - border-color: #409eff; | ||
| 1638 | - } | ||
| 1639 | - } | ||
| 1640 | 1680 | ||
| 1641 | - .search-select { | 1681 | +.search-input, .search-select { |
| 1642 | - padding: 8px 12px; | 1682 | + padding: 6px 8px; |
| 1643 | - border: 1px solid #ddd; | 1683 | + border: 1px solid #d9d9d9; |
| 1644 | border-radius: 4px; | 1684 | border-radius: 4px; |
| 1645 | - font-size: 14px; | 1685 | + font-size: 12px; |
| 1646 | width: 120px; | 1686 | width: 120px; |
| 1647 | - background: white; | 1687 | +} |
| 1648 | - cursor: pointer; | ||
| 1649 | - transition: border-color 0.3s; | ||
| 1650 | 1688 | ||
| 1651 | - &:focus { | 1689 | +.search-input:focus, .search-select:focus { |
| 1652 | outline: none; | 1690 | outline: none; |
| 1653 | - border-color: #409eff; | 1691 | + border-color: #1890ff; |
| 1654 | - } | 1692 | +} |
| 1655 | - } | ||
| 1656 | - } | ||
| 1657 | 1693 | ||
| 1658 | - .search-actions { | 1694 | +.search-actions { |
| 1659 | - margin-left: auto; | ||
| 1660 | display: flex; | 1695 | display: flex; |
| 1661 | gap: 8px; | 1696 | gap: 8px; |
| 1697 | +} | ||
| 1662 | 1698 | ||
| 1663 | - .search-btn, .reset-btn { | 1699 | +.search-btn { |
| 1664 | - padding: 8px 16px; | 1700 | + background: #1890ff; |
| 1665 | - border: 1px solid #ddd; | 1701 | + color: white; |
| 1666 | - border-radius: 4px; | 1702 | + border: none; |
| 1667 | - font-size: 14px; | 1703 | + padding: 4px 8px; |
| 1704 | + border-radius: 3px; | ||
| 1705 | + font-size: 11px; | ||
| 1668 | cursor: pointer; | 1706 | cursor: pointer; |
| 1669 | - transition: all 0.3s; | 1707 | +} |
| 1670 | - background: white; | ||
| 1671 | - | ||
| 1672 | - &:hover { | ||
| 1673 | - background: #f5f7fa; | ||
| 1674 | - } | ||
| 1675 | 1708 | ||
| 1676 | - &:disabled { | 1709 | +.search-btn:hover { |
| 1677 | - opacity: 0.6; | 1710 | + background: #40a9ff; |
| 1678 | - cursor: not-allowed; | 1711 | +} |
| 1679 | - } | ||
| 1680 | - } | ||
| 1681 | 1712 | ||
| 1682 | - .search-btn { | 1713 | +.reset-btn { |
| 1683 | - background: #409eff; | 1714 | + background: #ff7875; |
| 1684 | color: white; | 1715 | color: white; |
| 1685 | - border-color: #409eff; | 1716 | + border: none; |
| 1717 | + padding: 4px 8px; | ||
| 1718 | + border-radius: 3px; | ||
| 1719 | + font-size: 11px; | ||
| 1720 | + cursor: pointer; | ||
| 1721 | + height: 24px; | ||
| 1722 | + display: flex; | ||
| 1723 | + align-items: center; | ||
| 1724 | +} | ||
| 1686 | 1725 | ||
| 1687 | - &:hover { | 1726 | +.reset-btn:hover { |
| 1688 | - background: #66b1ff; | 1727 | + background: #ff9c99; |
| 1689 | - } | ||
| 1690 | - } | ||
| 1691 | - } | ||
| 1692 | - } | ||
| 1693 | } | 1728 | } |
| 1694 | 1729 | ||
| 1730 | +/* 操作区域 */ | ||
| 1695 | .action-section { | 1731 | .action-section { |
| 1696 | background: white; | 1732 | background: white; |
| 1697 | - padding: 12px 20px; | 1733 | + padding: 12px 16px; |
| 1698 | - margin-bottom: 16px; | 1734 | + border-bottom: 1px solid #e0e0e0; |
| 1699 | - border-radius: 4px; | 1735 | +} |
| 1700 | - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); | ||
| 1701 | 1736 | ||
| 1702 | - .action-buttons { | 1737 | +.action-buttons { |
| 1703 | display: flex; | 1738 | display: flex; |
| 1704 | - gap: 12px; | 1739 | + gap: 6px; |
| 1740 | +} | ||
| 1705 | 1741 | ||
| 1706 | - .action-btn { | 1742 | +.action-btn { |
| 1707 | - padding: 8px 16px; | 1743 | + padding: 4px 8px; |
| 1708 | - border: 1px solid #ddd; | 1744 | + border: none; |
| 1709 | - border-radius: 4px; | 1745 | + border-radius: 3px; |
| 1710 | - font-size: 14px; | 1746 | + font-size: 11px; |
| 1711 | cursor: pointer; | 1747 | cursor: pointer; |
| 1712 | - transition: all 0.3s; | 1748 | + transition: all 0.2s; |
| 1713 | - background: white; | 1749 | +} |
| 1714 | - | ||
| 1715 | - &:hover { | ||
| 1716 | - background: #f5f7fa; | ||
| 1717 | - } | ||
| 1718 | - | ||
| 1719 | - &:disabled { | ||
| 1720 | - opacity: 0.6; | ||
| 1721 | - cursor: not-allowed; | ||
| 1722 | - } | ||
| 1723 | 1750 | ||
| 1724 | - &.primary { | 1751 | +.action-btn.primary { |
| 1725 | - background: #409eff; | 1752 | + background: #1890ff; |
| 1726 | color: white; | 1753 | color: white; |
| 1727 | - border-color: #409eff; | 1754 | +} |
| 1728 | 1755 | ||
| 1729 | - &:hover { | 1756 | +.action-btn.primary:hover { |
| 1730 | - background: #66b1ff; | 1757 | + background: #40a9ff; |
| 1731 | - } | 1758 | +} |
| 1732 | - } | ||
| 1733 | 1759 | ||
| 1734 | - &.secondary { | 1760 | +.action-btn.secondary { |
| 1735 | - background: #67c23a; | 1761 | + background: #52c41a; |
| 1736 | color: white; | 1762 | color: white; |
| 1737 | - border-color: #67c23a; | 1763 | +} |
| 1738 | 1764 | ||
| 1739 | - &:hover { | 1765 | +.action-btn.secondary:hover { |
| 1740 | - background: #85ce61; | 1766 | + background: #73d13d; |
| 1741 | - } | 1767 | +} |
| 1742 | - } | ||
| 1743 | 1768 | ||
| 1744 | - &.danger { | 1769 | +.action-btn.danger { |
| 1745 | - background: #f56c6c; | 1770 | + background: #ff4d4f; |
| 1746 | color: white; | 1771 | color: white; |
| 1747 | - border-color: #f56c6c; | ||
| 1748 | - | ||
| 1749 | - &:hover { | ||
| 1750 | - background: #f78989; | ||
| 1751 | - } | ||
| 1752 | - } | ||
| 1753 | - } | ||
| 1754 | - } | ||
| 1755 | } | 1772 | } |
| 1756 | 1773 | ||
| 1757 | .charts-section { | 1774 | .charts-section { |
| ... | @@ -1825,42 +1842,45 @@ onMounted(async () => { | ... | @@ -1825,42 +1842,45 @@ onMounted(async () => { |
| 1825 | width: 100%; | 1842 | width: 100%; |
| 1826 | } | 1843 | } |
| 1827 | 1844 | ||
| 1845 | +/* 表格区域 */ | ||
| 1828 | .table-section { | 1846 | .table-section { |
| 1829 | background: white; | 1847 | background: white; |
| 1830 | - border-radius: 4px; | 1848 | + margin: 16px; |
| 1831 | - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); | 1849 | + border-radius: 6px; |
| 1832 | overflow: hidden; | 1850 | overflow: hidden; |
| 1851 | + box-shadow: 0 2px 8px rgba(0,0,0,0.1); | ||
| 1852 | +} | ||
| 1833 | 1853 | ||
| 1834 | - .table-header { | 1854 | +.table-header { |
| 1855 | + padding: 8px 16px; | ||
| 1856 | + background: #fafafa; | ||
| 1857 | + border-bottom: 1px solid #e0e0e0; | ||
| 1835 | display: flex; | 1858 | display: flex; |
| 1836 | justify-content: flex-end; | 1859 | justify-content: flex-end; |
| 1837 | - align-items: center; | 1860 | +} |
| 1838 | - padding: 12px 20px; | ||
| 1839 | - border-bottom: 1px solid #f0f0f0; | ||
| 1840 | - background: #fafafa; | ||
| 1841 | 1861 | ||
| 1842 | - .table-controls { | 1862 | +.table-controls { |
| 1843 | display: flex; | 1863 | display: flex; |
| 1844 | - gap: 8px; | 1864 | + gap: 4px; |
| 1865 | +} | ||
| 1845 | 1866 | ||
| 1846 | - .control-btn { | 1867 | +.control-btn { |
| 1847 | - padding: 6px 12px; | ||
| 1848 | - border: 1px solid #ddd; | ||
| 1849 | - border-radius: 4px; | ||
| 1850 | background: white; | 1868 | background: white; |
| 1869 | + border: 1px solid #d9d9d9; | ||
| 1870 | + border-radius: 3px; | ||
| 1871 | + padding: 4px 8px; | ||
| 1872 | + font-size: 11px; | ||
| 1851 | cursor: pointer; | 1873 | cursor: pointer; |
| 1852 | - font-size: 14px; | 1874 | + transition: all 0.2s; |
| 1853 | - transition: all 0.3s; | 1875 | +} |
| 1854 | 1876 | ||
| 1855 | - &:hover { | 1877 | +.control-btn:hover { |
| 1856 | - background: #f5f7fa; | 1878 | + background: #f0f8ff; |
| 1857 | - border-color: #409eff; | 1879 | + border-color: #1890ff; |
| 1858 | - } | 1880 | + color: #1890ff; |
| 1859 | - } | 1881 | +} |
| 1860 | - } | ||
| 1861 | - } | ||
| 1862 | 1882 | ||
| 1863 | - .table-container { | 1883 | +.table-container { |
| 1864 | position: relative; | 1884 | position: relative; |
| 1865 | 1885 | ||
| 1866 | .loading-overlay { | 1886 | .loading-overlay { |
| ... | @@ -1880,126 +1900,165 @@ onMounted(async () => { | ... | @@ -1880,126 +1900,165 @@ onMounted(async () => { |
| 1880 | color: #666; | 1900 | color: #666; |
| 1881 | } | 1901 | } |
| 1882 | } | 1902 | } |
| 1903 | + } | ||
| 1883 | 1904 | ||
| 1884 | - .data-table { | 1905 | +.data-table { |
| 1885 | width: 100%; | 1906 | width: 100%; |
| 1886 | border-collapse: collapse; | 1907 | border-collapse: collapse; |
| 1887 | - font-size: 14px; | 1908 | + font-size: 12px; |
| 1888 | - | 1909 | +} |
| 1889 | - thead { | ||
| 1890 | - background: #fafafa; | ||
| 1891 | 1910 | ||
| 1892 | - th { | 1911 | +.data-table th, |
| 1893 | - padding: 12px 16px; | 1912 | +.data-table td { |
| 1913 | + padding: 8px 12px; | ||
| 1894 | text-align: left; | 1914 | text-align: left; |
| 1895 | - font-weight: 500; | 1915 | + border-bottom: 1px solid #f0f0f0; |
| 1916 | + font-size: 12px; | ||
| 1917 | +} | ||
| 1918 | + | ||
| 1919 | +.data-table th { | ||
| 1920 | + background: #fafafa; | ||
| 1921 | + font-weight: 600; | ||
| 1896 | color: #333; | 1922 | color: #333; |
| 1897 | - border-bottom: 1px solid #e0e0e0; | ||
| 1898 | white-space: nowrap; | 1923 | white-space: nowrap; |
| 1899 | - } | 1924 | +} |
| 1900 | - } | ||
| 1901 | - | ||
| 1902 | - tbody { | ||
| 1903 | - tr { | ||
| 1904 | - transition: background-color 0.3s; | ||
| 1905 | 1925 | ||
| 1906 | - &:hover { | 1926 | +.data-table tbody tr:hover { |
| 1907 | background: #f5f7fa; | 1927 | background: #f5f7fa; |
| 1908 | - } | 1928 | +} |
| 1909 | 1929 | ||
| 1910 | - &:nth-child(even) { | 1930 | +/* 表格复选框 */ |
| 1911 | - background: #fafafa; | 1931 | +.table-checkbox { |
| 1912 | - } | 1932 | + width: 14px; |
| 1933 | + height: 14px; | ||
| 1934 | +} | ||
| 1913 | 1935 | ||
| 1914 | - &:nth-child(even):hover { | 1936 | +/* 表格操作按钮 */ |
| 1915 | - background: #f0f2f5; | 1937 | +.table-btn { |
| 1916 | - } | 1938 | + padding: 2px 6px; |
| 1939 | + margin-right: 4px; | ||
| 1940 | + border: none; | ||
| 1941 | + border-radius: 3px; | ||
| 1942 | + font-size: 10px; | ||
| 1943 | + cursor: pointer; | ||
| 1944 | + display: inline-flex; | ||
| 1945 | + align-items: center; | ||
| 1946 | + gap: 2px; | ||
| 1947 | +} | ||
| 1917 | 1948 | ||
| 1918 | - td { | 1949 | +.table-btn.view { |
| 1919 | - padding: 12px 16px; | 1950 | + background: #1890ff; |
| 1920 | - border-bottom: 1px solid #f0f0f0; | 1951 | + color: white; |
| 1921 | - vertical-align: middle; | 1952 | +} |
| 1922 | 1953 | ||
| 1923 | - &.empty-data { | 1954 | +.table-btn.edit { |
| 1924 | - text-align: center; | 1955 | + background: #1890ff; |
| 1925 | - color: #999; | 1956 | + color: white; |
| 1926 | - font-style: italic; | 1957 | +} |
| 1927 | - padding: 40px; | 1958 | + |
| 1928 | - } | 1959 | +.table-btn.delete { |
| 1929 | - } | 1960 | + background: #ff4d4f; |
| 1930 | - } | 1961 | + color: white; |
| 1931 | - } | 1962 | +} |
| 1932 | - } | ||
| 1933 | - } | ||
| 1934 | 1963 | ||
| 1935 | - .pagination-wrapper { | 1964 | +/* 分页样式 */ |
| 1965 | +.table-footer { | ||
| 1936 | display: flex; | 1966 | display: flex; |
| 1937 | justify-content: space-between; | 1967 | justify-content: space-between; |
| 1938 | align-items: center; | 1968 | align-items: center; |
| 1939 | - padding: 12px 20px; | 1969 | + padding: 8px 16px; |
| 1940 | - border-top: 1px solid #f0f0f0; | 1970 | + background: #f8f9fa; |
| 1941 | - background: #fafafa; | 1971 | + border-top: 1px solid #e0e0e0; |
| 1972 | +} | ||
| 1942 | 1973 | ||
| 1943 | - .pagination-info { | 1974 | +.pagination-left { |
| 1944 | - font-size: 14px; | 1975 | + display: flex; |
| 1976 | + align-items: center; | ||
| 1977 | + gap: 16px; | ||
| 1978 | +} | ||
| 1979 | + | ||
| 1980 | +.pagination-info { | ||
| 1981 | + font-size: 12px; | ||
| 1945 | color: #666; | 1982 | color: #666; |
| 1946 | - } | 1983 | +} |
| 1947 | 1984 | ||
| 1948 | - .pagination-controls { | 1985 | +.page-size-selector { |
| 1949 | display: flex; | 1986 | display: flex; |
| 1987 | + align-items: center; | ||
| 1950 | gap: 4px; | 1988 | gap: 4px; |
| 1989 | + font-size: 11px; | ||
| 1990 | + color: #666; | ||
| 1991 | +} | ||
| 1992 | + | ||
| 1993 | +.page-size-select { | ||
| 1994 | + padding: 2px 4px; | ||
| 1995 | + border: 1px solid #d9d9d9; | ||
| 1996 | + border-radius: 3px; | ||
| 1997 | + font-size: 10px; | ||
| 1998 | + background: white; | ||
| 1999 | +} | ||
| 2000 | + | ||
| 2001 | +.pagination-container { | ||
| 2002 | + display: flex; | ||
| 1951 | align-items: center; | 2003 | align-items: center; |
| 2004 | + background: #f8f9fa; | ||
| 2005 | + border: 1px solid #e9ecef; | ||
| 2006 | + border-radius: 8px; | ||
| 2007 | + overflow: hidden; | ||
| 2008 | + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); | ||
| 2009 | +} | ||
| 1952 | 2010 | ||
| 1953 | - .page-btn { | 2011 | +.pagination-btn { |
| 1954 | - padding: 6px 12px; | 2012 | + padding: 2px 6px; |
| 1955 | - border: 1px solid #ddd; | 2013 | + border: none; |
| 1956 | - border-radius: 4px; | ||
| 1957 | background: white; | 2014 | background: white; |
| 2015 | + color: #6c757d; | ||
| 2016 | + font-size: 11px; | ||
| 2017 | + font-weight: 500; | ||
| 1958 | cursor: pointer; | 2018 | cursor: pointer; |
| 1959 | - font-size: 14px; | 2019 | + transition: all 0.2s; |
| 1960 | - transition: all 0.3s; | 2020 | + border-right: 1px solid #e9ecef; |
| 1961 | - min-width: 32px; | 2021 | + height: 20px; |
| 2022 | +} | ||
| 1962 | 2023 | ||
| 1963 | - &:hover:not(:disabled) { | 2024 | +.pagination-btn:hover:not(:disabled) { |
| 1964 | - background: #f5f7fa; | 2025 | + background: #e9ecef; |
| 1965 | - border-color: #409eff; | 2026 | + color: #495057; |
| 1966 | - } | 2027 | +} |
| 1967 | 2028 | ||
| 1968 | - &:disabled { | 2029 | +.pagination-btn:disabled { |
| 1969 | opacity: 0.5; | 2030 | opacity: 0.5; |
| 1970 | cursor: not-allowed; | 2031 | cursor: not-allowed; |
| 1971 | - } | 2032 | +} |
| 1972 | - | ||
| 1973 | - &.active { | ||
| 1974 | - background: #409eff; | ||
| 1975 | - color: white; | ||
| 1976 | - border-color: #409eff; | ||
| 1977 | - } | ||
| 1978 | - } | ||
| 1979 | - } | ||
| 1980 | 2033 | ||
| 1981 | - .pagination-jump { | 2034 | +.pagination-pages { |
| 1982 | display: flex; | 2035 | display: flex; |
| 1983 | - align-items: center; | 2036 | +} |
| 1984 | - gap: 8px; | ||
| 1985 | - font-size: 14px; | ||
| 1986 | - color: #666; | ||
| 1987 | 2037 | ||
| 1988 | - .jump-input { | 2038 | +.page-number { |
| 1989 | - width: 50px; | 2039 | + padding: 2px 6px; |
| 1990 | - padding: 4px 8px; | 2040 | + border: none; |
| 1991 | - border: 1px solid #ddd; | 2041 | + background: white; |
| 1992 | - border-radius: 4px; | 2042 | + color: #6c757d; |
| 2043 | + font-size: 11px; | ||
| 2044 | + font-weight: 500; | ||
| 2045 | + cursor: pointer; | ||
| 2046 | + transition: all 0.2s; | ||
| 2047 | + border-right: 1px solid #e9ecef; | ||
| 2048 | + min-width: 28px; | ||
| 1993 | text-align: center; | 2049 | text-align: center; |
| 1994 | - font-size: 14px; | 2050 | + height: 20px; |
| 2051 | +} | ||
| 1995 | 2052 | ||
| 1996 | - &:focus { | 2053 | +.page-number:hover { |
| 1997 | - outline: none; | 2054 | + background: #e9ecef; |
| 1998 | - border-color: #409eff; | 2055 | + color: #495057; |
| 1999 | - } | 2056 | +} |
| 2000 | - } | 2057 | + |
| 2001 | - } | 2058 | +.page-number.active { |
| 2002 | - } | 2059 | + background: #1890ff; |
| 2060 | + color: white; | ||
| 2061 | + font-weight: 600; | ||
| 2003 | } | 2062 | } |
| 2004 | 2063 | ||
| 2005 | .status-tag { | 2064 | .status-tag { |
| ... | @@ -2049,7 +2108,7 @@ onMounted(async () => { | ... | @@ -2049,7 +2108,7 @@ onMounted(async () => { |
| 2049 | overflow-y: auto; | 2108 | overflow-y: auto; |
| 2050 | } | 2109 | } |
| 2051 | 2110 | ||
| 2052 | -// 响应式设计 | 2111 | +/* 响应式设计 */ |
| 2053 | @media (max-width: 1200px) { | 2112 | @media (max-width: 1200px) { |
| 2054 | .charts-container { | 2113 | .charts-container { |
| 2055 | grid-template-columns: 1fr; | 2114 | grid-template-columns: 1fr; |
| ... | @@ -2071,6 +2130,5 @@ onMounted(async () => { | ... | @@ -2071,6 +2130,5 @@ onMounted(async () => { |
| 2071 | margin-top: 12px; | 2130 | margin-top: 12px; |
| 2072 | } | 2131 | } |
| 2073 | } | 2132 | } |
| 2074 | - | ||
| 2075 | } | 2133 | } |
| 2076 | </style> | 2134 | </style> | ... | ... |
-
Please register or login to post a comment