()
| 180 | |
| 181 | // 渲染凭证列表 |
| 182 | renderList() { |
| 183 | const list = document.getElementById(this.getElementId('CredsList')); |
| 184 | list.innerHTML = ''; |
| 185 | |
| 186 | const entries = Object.entries(this.filteredData); |
| 187 | |
| 188 | if (entries.length === 0) { |
| 189 | const msg = this.totalCount === 0 ? '暂无凭证文件' : '当前筛选条件下暂无数据'; |
| 190 | list.innerHTML = `<p style="text-align: center; color: #666;">${msg}</p>`; |
| 191 | document.getElementById(this.getElementId('PaginationContainer')).style.display = 'none'; |
| 192 | return; |
| 193 | } |
| 194 | |
| 195 | entries.forEach(([, credInfo]) => { |
| 196 | list.appendChild(createCredCard(credInfo, this)); |
| 197 | }); |
| 198 | |
| 199 | document.getElementById(this.getElementId('PaginationContainer')).style.display = |
| 200 | this.getTotalPages() > 1 ? 'flex' : 'none'; |
| 201 | this.updateBatchControls(); |
| 202 | }, |
| 203 | |
| 204 | // 获取总页数 |
| 205 | getTotalPages() { |
nothing calls this directly
no test coverage detected