From b9cd3cace77238b926b12212625b936ac8725478 Mon Sep 17 00:00:00 2001 From: #7 Date: Mon, 1 Jun 2020 10:34:33 +0900 Subject: [PATCH] Revert "Release 2020/06/01" --- assets/locales/zh_CN.json | 5 +- components/AgencyBarChart.vue | 52 +++++--- .../ConfirmedCasesByMunicipalitiesTable.vue | 43 +++++- ...ConfirmedCasesIncreaseRatioByWeekChart.vue | 43 ++++-- components/DashedRectangleTimeBarChart.vue | 44 +++++-- components/DataView.vue | 37 +----- components/DataViewExpantionPanel.vue | 64 --------- components/DataViewTable.vue | 123 ++++++++---------- components/MetroBarChart.vue | 40 ++++-- components/MonitoringConfirmedCasesChart.vue | 47 ++++--- .../MonitoringConsultationDeskReportChart.vue | 44 +++---- components/PositiveRateMixedChart.vue | 65 +++++---- components/SevereCaseBarChart.vue | 36 +++-- components/TimeBarChart.vue | 85 +++++++----- components/TimeStackedBarChart.vue | 72 +++++----- components/UntrackedRateMixedChart.vue | 54 +++++--- components/WhatsNew.vue | 7 +- components/cards/AgencyCard.vue | 23 +--- .../cards/ConfirmedCasesAttributesCard.vue | 6 +- .../ConfirmedCasesByMunicipalitiesCard.vue | 2 +- components/cards/MetroCard.vue | 36 ++--- nuxt-i18n.config.ts | 64 +++++---- pages/index.vue | 5 +- utils/formatDate.ts | 24 ---- utils/formatTable.ts | 11 +- 25 files changed, 524 insertions(+), 508 deletions(-) delete mode 100644 components/DataViewExpantionPanel.vue diff --git a/assets/locales/zh_CN.json b/assets/locales/zh_CN.json index 5598483701..5f4bef9d9b 100644 --- a/assets/locales/zh_CN.json +++ b/assets/locales/zh_CN.json @@ -463,8 +463,5 @@ "テレワーク・時差出勤などスムーズビズの取組は、新型コロナウイルス感染症の対策としても効果的です。感染症対策として、東京2020大会時の交通混雑緩和に向けた取組の前倒しをお願いします。": "远程工作、错峰上班等Smooth Biz措施,对于新冠肺炎疫情也能起到很好的控制效果。为了控制疫情扩散,望企业能提前施行2020东京奥运交通舒缓措施。", "(注)検査結果の判明日を基準とする": "(注)以出检查结果的日期为准。", "※(1)、(2)、(6)、(7)は、7日間移動平均で算出(たとえば、5月7日の移動平均値は、5月1日から5月7日までの実績値を平均したもの)。また、(1)の数字が10人以下となった場合は、(2)及び(3)は参考値とする": "※(1)、(2)、(6)、(7)是7天移动平均值(例如,5月7日的移动平均值是5月1日至5月7日数值的平均)。若(1)的数字低于10人,(2)和(3)的数值为参考值", - "検査実施人数(健康安全研究センターによる実施分)": "检查人数(由“健康安全研究中心”实施)", - "※(4)(5)の目安となる数値は、患者数に応じた病床の確保数を参考として記載している。": "※(4)(5)的关注数值是对应的病床数目。", - "(5)入院患者数 レベル1:1,000床 → レベル2:3,000床 → レベル3:4,000床": "(5)住院患者数 1级:1,000床 → 2级:3,000床 → 3级:4,000床", - "(4)重症患者数 レベル1:100床 → レベル2:300床 → レベル3:700床": "(4)重症患者数 1级:100床 → 2级:300床 → 3级:700床" + "検査実施人数(健康安全研究センターによる実施分)": "检查人数(由“健康安全研究中心”实施)" } \ No newline at end of file diff --git a/components/AgencyBarChart.vue b/components/AgencyBarChart.vue index ad37c197d6..22c6dfa41f 100644 --- a/components/AgencyBarChart.vue +++ b/components/AgencyBarChart.vue @@ -15,7 +15,29 @@ :height="240" /> @@ -25,12 +47,8 @@ import Vue from 'vue' import VueI18n from 'vue-i18n' import { ChartOptions } from 'chart.js' import { ThisTypedComponentOptionsWithRecordProps } from 'vue/types/options' -import AgencyData from '@/data/agency.json' +import agencyData from '@/data/agency.json' import DataView from '@/components/DataView.vue' -import DataViewTable, { - TableHeader, - TableItem -} from '@/components/DataViewTable.vue' import { getGraphSeriesStyle } from '@/utils/colors' import { DisplayData, DataSets } from '@/plugins/vue-chart' @@ -46,21 +64,26 @@ interface HTMLElementEvent extends MouseEvent { } type Data = { canvas: boolean + chartData: typeof agencyData + date: string agencies: VueI18n.TranslateResult[] } type Methods = {} type Computed = { displayData: AgencyDisplayData displayOption: ChartOptions - tableHeaders: TableHeader[] - tableData: TableItem[] + tableHeaders: { + text: VueI18n.TranslateResult + value: string + }[] + tableData: { + [key: number]: number + }[] } type Props = { title: string titleId: string chartId: string - chartData: typeof AgencyData - date: string unit: string } @@ -74,7 +97,7 @@ const options: ThisTypedComponentOptionsWithRecordProps< created() { this.canvas = process.browser }, - components: { DataView, DataViewTable }, + components: { DataView }, props: { title: { type: String, @@ -91,11 +114,6 @@ const options: ThisTypedComponentOptionsWithRecordProps< required: false, default: 'agency-bar-chart' }, - chartData: Object, - date: { - type: String, - default: '' - }, unit: { type: String, required: false, @@ -111,6 +129,8 @@ const options: ThisTypedComponentOptionsWithRecordProps< return { canvas: true, + chartData: agencyData, + date: agencyData.date, agencies } }, diff --git a/components/ConfirmedCasesByMunicipalitiesTable.vue b/components/ConfirmedCasesByMunicipalitiesTable.vue index 0c43a3ef7e..e998cfe9c7 100644 --- a/components/ConfirmedCasesByMunicipalitiesTable.vue +++ b/components/ConfirmedCasesByMunicipalitiesTable.vue @@ -13,7 +13,7 @@ :fixed-header="true" :mobile-breakpoint="0" :disable-sort="true" - class="cardTable" + class="cardTableMunicipalities" /> + + - - diff --git a/components/DataViewTable.vue b/components/DataViewTable.vue index 95cd010d86..562e035033 100644 --- a/components/DataViewTable.vue +++ b/components/DataViewTable.vue @@ -1,88 +1,69 @@