| | |
| | | this.options = (this.$store.getters.tasktypes || []).map((o) => |
| | | labelFix[o.label] ? { ...o, label: labelFix[o.label] } : o |
| | | ); |
| | | console.log(11, this.options); |
| | | |
| | | // 获取科室列表 |
| | | this.flatArraydept = (this.$store.getters.belongDepts || []).map( |
| | |
| | | } |
| | | }, |
| | | sortChineseNumber(aRow, bRow) { |
| | | return this.compareWardNames(this.getWardName(aRow), this.getWardName(bRow)); |
| | | return this.compareWardNames( |
| | | this.getWardName(aRow), |
| | | this.getWardName(bRow) |
| | | ); |
| | | }, |
| | | sortHospitalWard(aRow, bRow) { |
| | | return this.compareWardNames( |
| | |
| | | // 病区统计(含统计类型为空的情况) |
| | | if (this.queryParams.statisticaltype != 2) { |
| | | const rawSelected = this.queryParams.leavehospitaldistrictcodes || []; |
| | | const selected = rawSelected.filter( |
| | | (code) => code && code !== "all" |
| | | ); |
| | | const selected = rawSelected.filter((code) => code && code !== "all"); |
| | | const useAll = !rawSelected.length || rawSelected.includes("all"); |
| | | |
| | | if (!useAll && selected.length) { |
| | |
| | | |
| | | buildCompletedMeta() { |
| | | return { |
| | | dimension: |
| | | this.queryParams.statisticaltype == 2 ? "dept" : "ward", |
| | | dimension: this.queryParams.statisticaltype == 2 ? "dept" : "ward", |
| | | scope: this.satisfactionScope, |
| | | dateRange: [...(this.queryParams.dateRange || [])], |
| | | }; |
| | |
| | | |
| | | // 按当前统计类型分组:病区统计 -> 病区,科室统计 -> 科室 |
| | | groupCompletedRows(rows) { |
| | | const dimension = |
| | | this.queryParams.statisticaltype == 2 ? "dept" : "ward"; |
| | | const dimension = this.queryParams.statisticaltype == 2 ? "dept" : "ward"; |
| | | const groupMap = new Map(); |
| | | |
| | | (rows || []).forEach((row) => { |
| | | const name = |
| | | dimension === "ward" ? this.wardNameOf(row) : this.deptNameOf(row); |
| | | const code = |
| | | dimension === "ward" |
| | | ? this.wardCodeOf(row) |
| | | : this.deptCodeOf(row); |
| | | dimension === "ward" ? this.wardCodeOf(row) : this.deptCodeOf(row); |
| | | |
| | | const key = String(code || name || "unknown"); |
| | | if (!groupMap.has(key)) { |
| | | groupMap.set(key, { |
| | | key, |
| | | label: |
| | | name || (dimension === "ward" ? "未分病区" : "未分科室"), |
| | | label: name || (dimension === "ward" ? "未分病区" : "未分科室"), |
| | | rows: [], |
| | | }); |
| | | } |
| | |
| | | const orderMap = new Map(); |
| | | |
| | | (list || []).forEach((item, index) => { |
| | | const code = |
| | | dimension === "ward" ? item.districtCode : item.deptCode; |
| | | const code = dimension === "ward" ? item.districtCode : item.deptCode; |
| | | if (code) orderMap.set(String(code), index); |
| | | }); |
| | | |