| | |
| | | end-placeholder="结束日期" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="床号排序" prop="bedSort"> |
| | | <el-select |
| | | v-model="queryParams.bedSort" |
| | | placeholder="不按床号排序" |
| | | style="width: 160px" |
| | | > |
| | | <el-option label="不按床号排序" :value="null"></el-option> |
| | | <el-option label="按床号正序" :value="1"></el-option> |
| | | <el-option label="按床号倒序" :value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-row> |
| | | <el-form-item> |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | cry: 0, |
| | | bedSort: null, |
| | | searchscope: 3, |
| | | scopetype: [], |
| | | leaveldeptcodes: [], |
| | |
| | | /** 查询患者列表 */ |
| | | 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 }) { |
| | |
| | | this.queryParams.leaveldeptcodes.push(code); |
| | | this.queryParams.leavehospitaldistrictcodes = []; |
| | | this.queryParams.searchscope = 1; |
| | | } else if (type == 2) { |
| | | this.queryParams.leavehospitaldistrictcodes.push(code); |
| | | this.queryParams.leaveldeptcodes = []; |
| | | this.queryParams.searchscope = 2; |
| | | } else if (type == 3) { |
| | | this.queryParams.leaveldeptcodes = store.getters.belongDepts.map( |
| | | (obj) => obj.deptCode |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | cry: 0, |
| | | bedSort: null, |
| | | searchscope: 3, |
| | | scopetype: [], |
| | | leaveldeptcodes: [], |