|
|
@@ -2,7 +2,13 @@
|
|
|
<template>
|
|
|
<app-view>
|
|
|
<template #header>
|
|
|
- <app-filter :option="filterOption" />
|
|
|
+ <app-filter :option="filterOption">
|
|
|
+ <template #userid="{ item }">
|
|
|
+ <el-form-item :label="item.label">
|
|
|
+ <app-select-investor v-model="item.value" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </app-filter>
|
|
|
</template>
|
|
|
<app-table :data="dataList" :columns="tableColumns" :loading="loading">
|
|
|
<template #headerLeft>
|
|
|
@@ -28,17 +34,23 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef } from 'vue'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
+import { formatDate } from '@/filters'
|
|
|
import { useDataFilter } from '@/hooks/datatable-v2'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { useOperation } from '@/hooks/operation'
|
|
|
+import { useEnum } from '@/hooks/enum'
|
|
|
import { query } from '@/services/api/notice'
|
|
|
+import { i18n } from '@/stores'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
import AppPagination from '@pc/components/base/pagination/index.vue'
|
|
|
import AppOperation from '@pc/components/base/operation/index.vue'
|
|
|
import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
|
|
|
-import { i18n } from '@/stores'
|
|
|
+import AppSelectInvestor from '@pc/components/modules/select-investor/index.vue'
|
|
|
|
|
|
const { global: { t } } = i18n
|
|
|
+const msgtypeEnum = useEnum('msgtype') // 消息类型
|
|
|
+const sendtypeEnum = useEnum('sendtype') // 发布类型
|
|
|
+const sendstatusEnum = useEnum('sendstatus') // 推送状态
|
|
|
|
|
|
const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Notice.QueryRsp>({
|
|
|
onClose: () => onSearch()
|
|
|
@@ -56,11 +68,11 @@ const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(query,
|
|
|
|
|
|
const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
{ field: 'title', label: 'notice.manage.title' },
|
|
|
- { field: 'msgtype', label: 'notice.manage.msgtype' },
|
|
|
- { field: 'sendtype', label: 'notice.manage.sendtype' },
|
|
|
- { field: 'sentstatus', label: 'notice.manage.sentstatus' },
|
|
|
- { field: 'scheduletime', label: 'notice.manage.scheduletime' },
|
|
|
- { field: 'endtime', label: 'notice.manage.endtime' },
|
|
|
+ { field: 'msgtype', label: 'notice.manage.msgtype', formatValue: (val) => msgtypeEnum.getEnumTypeName(val) },
|
|
|
+ { field: 'sendtype', label: 'notice.manage.sendtype', formatValue: (val) => sendtypeEnum.getEnumTypeName(val) },
|
|
|
+ { field: 'sentstatus', label: 'notice.manage.sentstatus', formatValue: (val) => sendstatusEnum.getEnumTypeName(val) },
|
|
|
+ { field: 'scheduletime', label: 'notice.manage.scheduletime', formatValue: (val) => formatDate(val) },
|
|
|
+ { field: 'endtime', label: 'notice.manage.endtime', formatValue: (val) => formatDate(val) },
|
|
|
{ field: 'recipient', label: 'notice.manage.recipient' },
|
|
|
{ field: 'operate', label: 'common.operate', fixed: 'right' }
|
|
|
])
|
|
|
@@ -73,7 +85,8 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
|
|
|
},
|
|
|
{
|
|
|
field: 'msgtype',
|
|
|
- label: t('notice.manage.msgtype')
|
|
|
+ label: t('notice.manage.msgtype'),
|
|
|
+ options: () => msgtypeEnum.getEnumOptions()
|
|
|
},
|
|
|
{
|
|
|
field: 'content',
|
|
|
@@ -85,11 +98,16 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
|
|
|
},
|
|
|
{
|
|
|
field: 'sendtype',
|
|
|
- label: t('notice.manage.sendtype')
|
|
|
+ label: t('notice.manage.sendtype'),
|
|
|
+ options: () => sendtypeEnum.getEnumOptions()
|
|
|
},
|
|
|
{
|
|
|
field: 'isforcedisplay',
|
|
|
- label: t('notice.manage.isforcedisplay')
|
|
|
+ label: t('notice.manage.isforcedisplay'),
|
|
|
+ options: () => [
|
|
|
+ { label: '是', value: 1 },
|
|
|
+ { label: '否', value: 0 }
|
|
|
+ ]
|
|
|
},
|
|
|
],
|
|
|
buttons: [
|