Compare commits

..

No commits in common. "85251a951df79ad15718f56808a22923ee1e089e" and "643e5454bf5ab1459ee0ca9d5075f0371980cdba" have entirely different histories.

View File

@ -7,7 +7,7 @@
<a-form-item label="活动名称" name="name">
<a-select v-model:value="searchFormData.activityId">
<a-select-option v-for="item of activityList" :value="item.id">{{ item.title
}}</a-select-option>
}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
@ -24,6 +24,7 @@
</a-form>
</template>
</x-search-bar>
<a-row :gutter="8" :wrap="false">
<a-col flex="auto">
<a-card type="flex">
@ -40,17 +41,15 @@
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'createdAt'">
<span>{{ record.createdAt && dayjs(record.createdAt).format('YYYY-MM-DD HH:mm') }}</span>
</template>
<template v-else-if="column.dataIndex === 'concatType'">
<a-tag :color="getConcatTypeColor(record['concatType'])">
{{ getConcatTypeText(record['concatType']) }}
</a-tag>
</template>
<!-- <template v-if="'action' === column.key">
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
<a-tooltip>
<template #title> {{ $t('pages.system.user.edit') }}</template>
<edit-outlined /> </a-tooltip></x-action-button>
<x-action-button @click="handleDelete(record)">
<a-tooltip>
<template #title>{{ $t('pages.system.delete') }}</template>
@ -72,10 +71,12 @@
<template v-else>
<span>{{ content }}</span>
</template>
</a-modal>
</template>
<script setup>
import { message, Modal, Tag } from 'ant-design-vue'
import { message, Modal } from 'ant-design-vue'
import { ref } from 'vue'
import apis from '@/apis'
import { formatUtcDateTime } from '@/utils/util'
@ -90,44 +91,22 @@ defineOptions({
name: 'activityOrder',
})
const { t } = useI18n() // t
//
const getConcatTypeText = (type) => {
const typeMap = {
owner: '业主',
customers: '客户',
mediator: '中介',
peer: '同行'
};
return typeMap[type] || type || '未知';
}
const getConcatTypeColor = (type) => {
const colorMap = {
owner: 'blue',
customers: 'green',
mediator: 'orange',
peer: 'purple'
};
return colorMap[type] || 'default';
}
const open = ref(false)
const imgList = ref([])
const type = ref(1)
const columns = [
{ title: '活动名称', dataIndex: 'activityName' },
{ title: '客户姓名', dataIndex: 'concatName' },
{ title: '联系方式', dataIndex: 'concatPhone' },
{ title: '身份类别', dataIndex: 'concatType' },
{ title: '认证信息', dataIndex: 'concatAddress'},
{ title: '客户姓名', dataIndex: 'customerName' },
{ title: '联系方式', dataIndex: 'customerPhone' },
{ title: '报名时间', dataIndex: 'createdAt', width: 150, align: 'center' },
// { title: t('button.action'), key: 'action', fixed: 'right', width: 150, align: 'center' },
]
const activityList = ref([])
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } =
usePagination()
const editDialogRef = ref()
getPageList()
getActiveList()
@ -176,6 +155,7 @@ async function getPageList() {
hideLoading()
}
}
/**
* 删除
*/
@ -204,6 +184,7 @@ function handleDelete({ id }) {
},
})
}
/**
* 分页
*/
@ -212,6 +193,7 @@ function onTableChange({ current, pageSize }) {
paginationState.pageSize = pageSize
getPageList()
}
/**
* 搜索
*/
@ -219,6 +201,7 @@ function handleSearch() {
resetPagination()
getPageList()
}
/**
* 下载文件
*/
@ -229,6 +212,7 @@ async function handleExport() {
message.warning('请选择活动')
return
}
// { responseType: 'blob' }
const response = await apis.activity.exportFile({ activityId })
console.log(response)
@ -260,4 +244,5 @@ async function onOk() {
await getPageList()
}
</script>
<style lang="less" scoped></style>