Skip to content

Commit

Permalink
Merge pull request code4nagoya#622 from ihcugamay/feature/issue-618-a…
Browse files Browse the repository at this point in the history
…dd-discharge-column

陽性患者属性テーブルに退院列を追加
  • Loading branch information
halsk authored Mar 9, 2020
2 parents 1df0e76 + f766962 commit 755fa22
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
12 changes: 12 additions & 0 deletions components/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
:mobile-breakpoint="0"
class="cardTable"
/>
<div class="note">※退院には、死亡退院を含む</div>
<template v-slot:infoPanel>
<data-view-basic-info-panel
:l-text="info.lText"
Expand All @@ -33,6 +34,9 @@
white-space: nowrap;
color: $gray-2;
font-size: 12px;
&.text-center {
text-align: center;
}
}
tbody {
tr {
Expand All @@ -41,6 +45,9 @@
padding: 8px 10px;
height: auto;
font-size: 12px;
&.text-center {
text-align: center;
}
}
&:nth-child(odd) {
td {
Expand All @@ -56,6 +63,11 @@
}
}
}
.note {
padding: 8px;
font-size: 12px;
color: #808080;
}
</style>

<script>
Expand Down
8 changes: 6 additions & 2 deletions utils/formatTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ const headers = [
{ text: '日付', value: '日付' },
{ text: '居住地', value: '居住地' },
{ text: '年代', value: '年代' },
{ text: '性別', value: '性別' }
{ text: '性別', value: '性別' },
{ text: '退院※', value: '退院', align: 'center' }
]

type DataType = {
リリース日: Date
居住地: string | null
年代: string | null
性別: '男性' | '女性'
退院: '◯' | null
[key: string]: any
}

Expand All @@ -20,6 +22,7 @@ type TableDataType = {
居住地: DataType['居住地']
年代: DataType['年代']
性別: DataType['性別'] | '不明'
退院: DataType['退院']
}

type TableDateType = {
Expand All @@ -37,7 +40,8 @@ export default (data: DataType[]) => {
日付: dayjs(d['リリース日']).format('MM/DD') ?? '不明',
居住地: d['居住地'] ?? '不明',
年代: d['年代'] ?? '不明',
性別: d['性別'] ?? '不明'
性別: d['性別'] ?? '不明',
退院: d['退院']
}
tableDate.datasets.push(TableRow)
})
Expand Down

0 comments on commit 755fa22

Please sign in to comment.