diff --git a/src/components/FactoryDetailPage.vue b/src/components/FactoryDetailPage.vue index 7d2c0a8..3b7f783 100644 --- a/src/components/FactoryDetailPage.vue +++ b/src/components/FactoryDetailPage.vue @@ -48,22 +48,20 @@ - - -
mdi-camera-plus 補充照片
+ + +
- +

{{ factoryAddressAndLandcode }}

經緯度

@@ -174,11 +172,23 @@ export default createComponent({ const factoryType = computed(() => { if (appState.factoryData) { return getFactoryTypeText(appState.factoryData) + } else { + return null } }) const factoryName = computed(() => { - return appState.factoryData?.name + return appState.factoryData?.name || '' + }) + + const factoryAddressAndLandcode = computed(() => { + if (appState.factoryData) { + const { townname, sectname, sectcode, landcode } = appState.factoryData + // 白鷺段(1005)817地號 + return `${townname} ${sectname} (${sectcode}) ${landcode}地號` + } else { + return '' + } }) const full = computed(() => appState.factoryDetailsExpanded) @@ -273,6 +283,7 @@ export default createComponent({ factoryId, factoryType, factoryName, + factoryAddressAndLandcode, pastDescriptions, longitude, latitude, diff --git a/src/types.ts b/src/types.ts index d96b3dd..b35ded2 100644 --- a/src/types.ts +++ b/src/types.ts @@ -104,6 +104,9 @@ export type FactoryData = { lng: number, name: string, landcode: string, + townname: string, + sectname: string, + sectcode: string, type: FactoryType, images: FactoryImage[], // TODO: can be one of https://docs.djangoproject.com/en/2.2/ref/settings/#datetime-input-formats