| | |
| | | /** 查询患者列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listpatient(this.queryParams).then((response) => { |
| | | listpatient(this.buildListQueryParams()).then((response) => { |
| | | console.log(response); |
| | | this.userList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** |
| | | * 组装 listpatient 入参: |
| | | * cry = 0 且登录机构为「省立同德翠苑院区 / 南华大学附属第一医院」时, |
| | | * 科室/病区字段 leaveldeptcodes、leavehospitaldistrictcodes 需换成 |
| | | * deptcodeList、hospitaldistrictcodeList。 |
| | | */ |
| | | buildListQueryParams() { |
| | | const params = { ...this.queryParams }; |
| | | const orgname = localStorage.getItem("orgname"); |
| | | const needRename = |
| | | params.cry === 0 && |
| | | (orgname === "省立同德翠苑院区" || |
| | | orgname === "南华大学附属第一医院"); |
| | | if (needRename) { |
| | | params.deptcodeList = params.leaveldeptcodes; |
| | | params.hospitaldistrictcodeList = params.leavehospitaldistrictcodes; |
| | | delete params.leaveldeptcodes; |
| | | delete params.leavehospitaldistrictcodes; |
| | | } |
| | | return params; |
| | | }, |
| | | /** 表格行样式 */ |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (rowIndex % 2 === 0) { |