Commit 0cab5ee2 by pangchong

feat: 事件列表

parent 7d21ea82
...@@ -39,7 +39,7 @@ const loginForm = reactive({ ...@@ -39,7 +39,7 @@ const loginForm = reactive({
}) })
const rules = { const rules = {
username: [ username: [
{ required: true, message: '请输入账号' }, { required: true, message: '请输入用户名' },
{ max: 200, message: '最多输入200个字' } { max: 200, message: '最多输入200个字' }
], ],
password: [ password: [
......
import { TableColumnData } from '@arco-design/web-vue'
//表格数据 //表格数据
export const columns = [ export const columns: TableColumnData[] = [
{
title: '序号',
align: 'center',
dataIndex: 'index',
slotName: 'index'
},
{ {
title: '事件名称', title: '事件名称',
dataIndex: 'title' dataIndex: 'title'
...@@ -10,26 +18,32 @@ export const columns = [ ...@@ -10,26 +18,32 @@ export const columns = [
slotName: 'initiator' slotName: 'initiator'
}, },
{ {
title: '职位', title: '参与人',
dataIndex: 'position', dataIndex: 'participants',
slotName: 'position' slotName: 'participants'
},
{
title: '开始时间',
dataIndex: 'startTime'
},
{
title: '结束时间',
dataIndex: 'endTime'
},
{
title: '时长',
dataIndex: 'duration'
}, },
// {
// title: '职位',
// dataIndex: 'position',
// slotName: 'position'
// },
{ {
title: '附件', title: '会议时间',
dataIndex: 'attachment' dataIndex: 'createdTime',
slotName: 'createdTime'
} }
// {
// title: '结束时间',
// dataIndex: 'endTime'
// },
// {
// title: '时长',
// dataIndex: 'duration'
// },
// {
// title: '附件',
// dataIndex: 'attachment'
// }
] ]
export const tableData = reactive([ export const tableData = reactive([
{ {
......
...@@ -8,14 +8,25 @@ ...@@ -8,14 +8,25 @@
<!-- table展示 --> <!-- table展示 -->
<div class="flex-auto overflow-y-auto px-4"> <div class="flex-auto overflow-y-auto px-4">
<a-table :columns="columns" :data="tableData" :bordered="false" :loading="loading" :pagination="false"> <a-table :columns="columns" :data="tableData" :bordered="false" :loading="loading" :pagination="false">
<template #index="{ rowIndex }">
{{ rowIndex + 1 }}
</template>
<template #initiator="{ record }"> <template #initiator="{ record }">
<div class="flex items-center"> <div class="flex items-center">
<global-avatar :avatar-size="24" :icon-size="12"></global-avatar> <global-avatar :size="32" :icon-size="12"></global-avatar>
<span class="ml-2">{{ record.initiator }}</span> <span class="ml-2">{{ getInitiatorName(record) }}</span>
</div>
</template>
<template #participants="{ record }">
<div class="flex items-center">
<a-avatar-group :size="32" :max-count="2">
<global-avatar :icon-size="12" v-for="item in record.userList"></global-avatar>
</a-avatar-group>
<span class="ml-2">{{ getParticipantsName(record.userList) }}</span>
</div> </div>
</template> </template>
<template #position="{ record }"> <template #createdTime="{ record }">
<a-button type="outline" size="mini">{{ record.position }}</a-button> {{ Day(parseInt(record.createdTime)).format('YYYY-MM-DD HH:mm:ss') }}
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -31,6 +42,7 @@ import { columns } from './constants/data.config' ...@@ -31,6 +42,7 @@ import { columns } from './constants/data.config'
import { alova } from '@/api/alova-instance' import { alova } from '@/api/alova-instance'
import useContactsStore from '@/store/contacts/index' import useContactsStore from '@/store/contacts/index'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import Day from '@/utils/dayjs'
const beginTime = ref('') const beginTime = ref('')
const endTime = ref('') const endTime = ref('')
...@@ -94,6 +106,15 @@ const { ...@@ -94,6 +106,15 @@ const {
} }
} }
) )
//获取发起人名称
const getInitiatorName = (record: any) => {
const initiatorId = record.channelId.split('_')[0]
return record.userList.find((item: any) => item.id == initiatorId)?.nickname
}
//获取参与人名称
const getParticipantsName = (userList: any[]) => {
return userList.map((item) => item.nickname).join(',')
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.arco-table-th) { :deep(.arco-table-th) {
......
...@@ -16,7 +16,18 @@ ...@@ -16,7 +16,18 @@
</a-space> </a-space>
</div> </div>
<!-- 其余的视频窗口 --> <!-- 其余的视频窗口 -->
<video-slider class="mb-3 px-4" @handle-click="idChangedHere" :id-set="userVideoContainerSet.onTopUserSet"></video-slider> <video-slider
class="mb-3 px-4"
@handle-click="idChangedHere"
:id-set="[
...userVideoContainerSet.onTopUserSet,
...userVideoContainerSet.onTopUserSet,
...userVideoContainerSet.onTopUserSet,
...userVideoContainerSet.onTopUserSet,
...userVideoContainerSet.onTopUserSet,
...userVideoContainerSet.onTopUserSet
]"
></video-slider>
<!-- 放大的窗口 --> <!-- 放大的窗口 -->
<video-tools :id="userVideoContainerSet.inCenter" class="px-4 flex flex-col flex-auto"></video-tools> <video-tools :id="userVideoContainerSet.inCenter" class="px-4 flex flex-col flex-auto"></video-tools>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment