| | |
| | | v-loading="loading" |
| | | :data="assessmentList" |
| | | @selection-change="handleSelectionChange" |
| | | @row-click="handleRowClick" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column |
| | | <el-table-column |
| | | label="住院号" |
| | | align="center" |
| | | prop="caseNo" |
| | | prop="inpatientno" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="潜在捐献者姓名" |
| | | label="捐献者姓名" |
| | | align="center" |
| | | prop="name" |
| | | width="120" |
| | |
| | | if (Array.isArray(response.data)) { |
| | | // 如果返回的是数组 |
| | | this.assessmentList = response.data; |
| | | this.total = response.data.length; |
| | | this.total = response.total; |
| | | } else if (response.data.rows) { |
| | | // 如果返回的是分页数据结构 |
| | | this.assessmentList = response.data.rows; |
| | | this.total = response.data.total; |
| | | this.total = response.total; |
| | | } else if (Array.isArray(response.data.list)) { |
| | | // 如果返回的是list字段 |
| | | this.assessmentList = response.data.list; |
| | | this.total = response.data.total || response.data.list.length; |
| | | this.total = response.total || response.data.list.length; |
| | | } else { |
| | | // 其他数据结构,尝试直接使用data |
| | | this.assessmentList = response.data; |
| | | this.total = response.total || response.data.length; |
| | | this.total = response.total || response.total; |
| | | } |
| | | } else { |
| | | // 如果data为空,使用根级别的rows或list |