|
@@ -9,14 +9,14 @@
|
|
|
@finish="handleFinish"
|
|
|
@finishFailed="handleFinishFailed"
|
|
|
>
|
|
|
- <a-form-item label="房间名称" name="roomTitle">
|
|
|
+ <a-form-item :label="t('room.roomTitle')" name="roomTitle">
|
|
|
<a-input
|
|
|
v-model:value="formState.roomTitle"
|
|
|
- placeholder="房间名称"
|
|
|
+ :placeholder="t('room.roomTitle')"
|
|
|
>
|
|
|
</a-input>
|
|
|
</a-form-item>
|
|
|
- <a-form-item label="使用时间" name="username">
|
|
|
+ <a-form-item :label="t('room.usingTime')" name="username">
|
|
|
<a-range-picker
|
|
|
:show-time="{ format: 'HH:mm' }"
|
|
|
format="YYYY-MM-DD HH:mm"
|
|
@@ -25,7 +25,9 @@
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
<a-form-item>
|
|
|
- <a-button type="primary" html-type="submit"> 确定 </a-button>
|
|
|
+ <a-button type="primary" html-type="submit">
|
|
|
+ {{ t('base.confirm') }}
|
|
|
+ </a-button>
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
</div>
|
|
@@ -59,12 +61,13 @@
|
|
|
import { computed, onMounted, UnwrapRef, watch, reactive, unref } from 'vue'
|
|
|
import { TableColumnProps } from 'ant-design-vue'
|
|
|
import { useStatisticStore } from '@/store/modules/statistic'
|
|
|
+import { useI18n } from '@/hook/useI18n'
|
|
|
|
|
|
+const { t } = useI18n()
|
|
|
const props = defineProps<{
|
|
|
current: string
|
|
|
}>()
|
|
|
|
|
|
-
|
|
|
const statisticStore = useStatisticStore()
|
|
|
// const total = computed(() => statisticStore.allRoom.total)
|
|
|
const pagination = computed(() => {
|
|
@@ -80,7 +83,7 @@ const pagination = computed(() => {
|
|
|
fetchList()
|
|
|
},
|
|
|
pageSizeOptions: ['10', '20', '50', '100'], //每页中显示的数据
|
|
|
- showTotal: (total: string) => `共有 ${total} 条数据` //分页中显示总的数据
|
|
|
+ showTotal: (total: string) => t('statistic.pageCount').replace('%N%', total) //分页中显示总的数据
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -100,31 +103,31 @@ const columns: TableColumnProps[] = [
|
|
|
// dataIndex: 'roomId'
|
|
|
// },
|
|
|
{
|
|
|
- title: '房间名称',
|
|
|
+ title: t('room.roomTitle'),
|
|
|
dataIndex: 'roomTitle'
|
|
|
},
|
|
|
{
|
|
|
- title: '相关场景',
|
|
|
+ title: t('statistic.relatedScenes'),
|
|
|
dataIndex: 'sceneNameList'
|
|
|
},
|
|
|
{
|
|
|
- title: '时长/分',
|
|
|
+ title: t('statistic.duration'),
|
|
|
dataIndex: 'lookTime'
|
|
|
},
|
|
|
{
|
|
|
- title: '创建时间',
|
|
|
+ title: t('statistic.createTime'),
|
|
|
dataIndex: 'createTime'
|
|
|
},
|
|
|
{
|
|
|
- title: '状态',
|
|
|
+ title: t('statistic.status'),
|
|
|
dataIndex: 'roomStatus'
|
|
|
},
|
|
|
{
|
|
|
- title: '观看',
|
|
|
+ title: t('statistic.watch'),
|
|
|
dataIndex: 'lookManCount'
|
|
|
},
|
|
|
{
|
|
|
- title: '分享',
|
|
|
+ title: t('statistic.share'),
|
|
|
dataIndex: 'shareCount'
|
|
|
}
|
|
|
]
|
|
@@ -134,8 +137,8 @@ const fetchList = () => {
|
|
|
pageNum: pagination.value.current,
|
|
|
pageSize: pagination.value.pageSize,
|
|
|
startTime: formState.userTime?.length ? formState.userTime[0] : '',
|
|
|
- endTime: formState.userTime?.length ? formState.userTime[1] : '',
|
|
|
- roomTitle: formState.roomTitle?.length ? formState.roomTitle : ''
|
|
|
+ endTime: formState.userTime?.length ? formState.userTime[1] : '',
|
|
|
+ roomTitle: formState.roomTitle?.length ? formState.roomTitle : ''
|
|
|
})
|
|
|
}
|
|
|
watch(
|