feat(emergency): 实现急救宣教推送到 IM 会话功能
- 新增 FirstAidPush 组件:分类筛选 + 搜索 + 单条/一键推送 - IM 端切换会话时 postMessage 携带 orderId 通知父页面 - 父页面监听 sessionChanged 联动推送按钮与后端调用 - 推送调后端 push/send 记录状态 + IM postMessage 推卡片 - 资源管理正文改富文本编辑器,修批量操作重复提示 - 重建 iweb 产物
This commit is contained in:
+29
-10
@@ -77,7 +77,16 @@
|
||||
</a-tab-pane>
|
||||
|
||||
<a-tab-pane key="records" tab="审核记录">
|
||||
<a-alert message="审核记录接口后端尚未提供独立列表,当前合并展示已通过+已驳回数据" type="info" show-icon style="margin-bottom: 12px" />
|
||||
<div class="filter-bar">
|
||||
<a-input v-model:value="recordsFilter.title" placeholder="搜索标题" allow-clear style="width: 200px" @press-enter="loadRecords" />
|
||||
<a-select v-model:value="recordsFilter.auditStatus" placeholder="审核操作" allow-clear style="width: 140px">
|
||||
<a-select-option :value="10">全部</a-select-option>
|
||||
<a-select-option :value="11">已通过</a-select-option>
|
||||
<a-select-option :value="12">已驳回</a-select-option>
|
||||
</a-select>
|
||||
<a-range-picker v-model:value="recordsFilter.dateRange" style="width: 240px" />
|
||||
<a-button type="primary" @click="loadRecords">查询</a-button>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="recordColumns"
|
||||
:data-source="recordsList"
|
||||
@@ -88,8 +97,8 @@
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<a-tag :color="record._action === 'pass' ? 'green' : 'red'">
|
||||
{{ record._action === 'pass' ? '通过' : '驳回' }}
|
||||
<a-tag :color="record.auditStatus === 11 ? 'green' : 'red'">
|
||||
{{ record.auditStatus === 11 ? '通过' : '驳回' }}
|
||||
</a-tag>
|
||||
</template>
|
||||
</template>
|
||||
@@ -110,9 +119,11 @@
|
||||
pendingListApi,
|
||||
passedListApi,
|
||||
rejectedListApi,
|
||||
recordsListApi,
|
||||
approveApi,
|
||||
rejectApi,
|
||||
} from './check.api';
|
||||
import dayjs from 'dayjs';
|
||||
import { CONTENT_TYPE } from '/@/views/resource/resource.data';
|
||||
import PreviewModal from '/@/views/resource/components/PreviewModal.vue';
|
||||
import RejectReasonModal from './components/RejectReasonModal.vue';
|
||||
@@ -135,6 +146,11 @@
|
||||
|
||||
const recordsList = ref<any[]>([]);
|
||||
const recordsLoading = ref(false);
|
||||
const recordsFilter = reactive({
|
||||
title: '',
|
||||
auditStatus: undefined as number | undefined,
|
||||
dateRange: undefined as any,
|
||||
});
|
||||
|
||||
const [registerPreviewModal, { openModal: openPreviewModal }] = useModal();
|
||||
const [registerRejectModal, { openModal: openRejectModal }] = useModal();
|
||||
@@ -228,13 +244,16 @@
|
||||
async function loadRecords() {
|
||||
recordsLoading.value = true;
|
||||
try {
|
||||
const [passed, rejected]: any = await Promise.all([
|
||||
passedListApi({ pageNo: 1, pageSize: 100 }),
|
||||
rejectedListApi({ pageNo: 1, pageSize: 100 }),
|
||||
]);
|
||||
const passedRecords = (passed?.records || []).map((item: any) => ({ ...item, _action: 'pass' }));
|
||||
const rejectedRecords = (rejected?.records || []).map((item: any) => ({ ...item, _action: 'reject' }));
|
||||
recordsList.value = [...passedRecords, ...rejectedRecords];
|
||||
const params: any = {
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
title: recordsFilter.title || undefined,
|
||||
auditStatus: recordsFilter.auditStatus ?? undefined,
|
||||
startDate: recordsFilter.dateRange?.[0] ? dayjs(recordsFilter.dateRange[0]).format('YYYY-MM-DD') : undefined,
|
||||
endDate: recordsFilter.dateRange?.[1] ? dayjs(recordsFilter.dateRange[1]).format('YYYY-MM-DD') : undefined,
|
||||
};
|
||||
const res: any = await recordsListApi(params);
|
||||
recordsList.value = res?.records || [];
|
||||
} finally {
|
||||
recordsLoading.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user