| | |
| | | <el-card class="tool-card"> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="16"> |
| | | <el-button type="primary" icon="el-icon-plus" @click="handleCreate" |
| | | <!-- <el-button type="primary" icon="el-icon-plus" @click="handleCreate" |
| | | >新增评估</el-button |
| | | > |
| | | <el-button |
| | | > --> |
| | | <!-- <el-button |
| | | type="success" |
| | | icon="el-icon-edit" |
| | | :disabled="single" |
| | |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | >删除</el-button |
| | | > |
| | | > --> |
| | | <el-button |
| | | type="warning" |
| | | icon="el-icon-download" |
| | |
| | | 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" |
| | |
| | | label="操作" |
| | | align="center" |
| | | width="200" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | > |
| | | <el-button |
| | | v-if=" |
| | | scope.row.assessState === '1' || |
| | | scope.row.assessState === '2' |
| | | scope.row.assessState != '3' || |
| | | scope.row.assessState != '4' |
| | | " |
| | | size="mini" |
| | | type="text" |
| | |
| | | @click.stop="handleAssess(scope.row)" |
| | | >评估</el-button |
| | | > |
| | | <el-button |
| | | <!-- <el-button |
| | | v-if="scope.row.assessState === '3'" |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-check" |
| | | @click.stop="handleConfirm(scope.row)" |
| | | >确认</el-button |
| | | > |
| | | > --> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | 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 |