| | |
| | | }); |
| | | } |
| | | |
| | | // 器官移植总统计(数据概览) |
| | | function mockOrganTotals() { |
| | | return [{ totalGet: 486, totalTransplant: 398, totalRecycle: 12, totalDiscard: 76 }]; |
| | | } |
| | | |
| | | // 捐献器官统计明细列表(器官明细详情) |
| | | function mockOrganList() { |
| | | const r = createRand(111); |
| | | const NAMES = ['张三', '李四', '王五', '赵六', '陈七', '刘八']; |
| | | const HOSPITALS = ['青岛大学附属医院', '青岛市立医院', '青岛市中心医院']; |
| | | const DOCTORS = ['李医生', '张医生', '王医生']; |
| | | const RECIPIENTS = ['王明', '陈强', '刘伟', '赵刚']; |
| | | const STATUS = [1, 1, 2, 3]; |
| | | return NAMES.map((name, i) => { |
| | | const year = YEARS[i % YEARS.length]; |
| | | const month = String(1 + Math.floor(r() * 12)).padStart(2, '0'); |
| | | const st = STATUS[i % STATUS.length]; |
| | | return { |
| | | id: 2000 + i, |
| | | caseNo: `O${year}00${i + 1}`, |
| | | name, |
| | | organName: ORGANS[i % ORGANS.length], |
| | | registerCountyName: REGIONS[i % REGIONS.length], |
| | | donateYear: year, |
| | | transplantstate: st, |
| | | organGetTime: `${year}-${month}-15 10:30`, |
| | | transplantTime: st === 1 ? `${year}-${month}-15 13:20` : '', |
| | | notgetreason: st === 3 ? '器官质量不合格' : '', |
| | | transplantName: st === 1 ? RECIPIENTS[i % RECIPIENTS.length] : '', |
| | | hospitalName: HOSPITALS[i % HOSPITALS.length], |
| | | transplantDoct: DOCTORS[i % DOCTORS.length] |
| | | }; |
| | | }); |
| | | } |
| | | |
| | | const MOCK_MAP = { |
| | | '/opo/totals/caseTrend': mockCaseTrend, |
| | | '/opo/totals/caseTrendArea': mockCaseTrendArea, |
| | |
| | | '/opo/totals/organMoon': mockOrganMoon, |
| | | '/opo/totals/organType': mockOrganType, |
| | | '/opo/totals/totals': mockTotalsAll, |
| | | '/opo/totals/trendList': mockTrendList |
| | | '/opo/totals/trendList': mockTrendList, |
| | | '/opo/totals/organTotals': mockOrganTotals, |
| | | '/opo/totals/organList': mockOrganList |
| | | }; |
| | | |
| | | export function mockTotals(url) { |