Remove daily task event flow page
This commit is contained in:
parent
200e1c6fad
commit
7d33d8a5e4
@ -146,12 +146,6 @@ export async function pageResidentDailyTaskClaimRecords(
|
||||
);
|
||||
}
|
||||
|
||||
export async function pageResidentDailyTaskEvents(params: Record<string, any>) {
|
||||
return requestClient.get<Record<string, any>>(`${TASK_CENTER_BASE}/event/page`, {
|
||||
params: { ...params, taskCategory: params.taskCategory || 'DAILY' },
|
||||
});
|
||||
}
|
||||
|
||||
export async function getVoiceRoomRedPacketConfig(sysOrigin: string) {
|
||||
return requestClient.get<Record<string, any>>(`${VOICE_ROOM_RED_PACKET_BASE}/config`, {
|
||||
params: { sysOrigin },
|
||||
|
||||
@ -24,7 +24,6 @@ import {
|
||||
import {
|
||||
getResidentDailyTaskConfig,
|
||||
pageResidentDailyTaskClaimRecords,
|
||||
pageResidentDailyTaskEvents,
|
||||
saveResidentDailyTaskConfig,
|
||||
} from '#/api/legacy/resident-activity';
|
||||
import { getAllowedSysOrigins } from '#/views/system/shared';
|
||||
@ -143,17 +142,6 @@ const claimColumns = [
|
||||
{ dataIndex: 'createTime', key: 'createTime', title: '创建时间', width: 180 },
|
||||
];
|
||||
|
||||
const eventColumns = [
|
||||
{ dataIndex: 'eventId', key: 'eventId', title: '事件ID', width: 260 },
|
||||
{ dataIndex: 'userId', key: 'userId', title: '用户ID', width: 140 },
|
||||
{ dataIndex: 'eventType', key: 'eventType', title: '事件类型', width: 190 },
|
||||
{ dataIndex: 'taskCode', key: 'taskCode', title: '命中任务', width: 220 },
|
||||
{ dataIndex: 'deltaValue', key: 'deltaValue', title: '增量', width: 100 },
|
||||
{ dataIndex: 'cycleKey', key: 'cycleKey', title: '周期', width: 130 },
|
||||
{ dataIndex: 'occurredAt', key: 'occurredAt', title: '发生时间', width: 180 },
|
||||
{ dataIndex: 'createTime', key: 'createTime', title: '入库时间', width: 180 },
|
||||
];
|
||||
|
||||
const accessStore = useAccessStore();
|
||||
const sysOriginOptions = computed(() => {
|
||||
const options = getAllowedSysOrigins(accessStore.accessCodes || []);
|
||||
@ -166,7 +154,6 @@ const activeTab = ref('config');
|
||||
const loading = ref(false);
|
||||
const saving = ref(false);
|
||||
const claimLoading = ref(false);
|
||||
const eventLoading = ref(false);
|
||||
|
||||
const form = reactive<Record<string, any>>({
|
||||
conditionJumps: [],
|
||||
@ -188,14 +175,6 @@ const claimQuery = reactive<Record<string, any>>({
|
||||
userId: '',
|
||||
});
|
||||
|
||||
const eventQuery = reactive<Record<string, any>>({
|
||||
cursor: 1,
|
||||
eventType: '',
|
||||
limit: 20,
|
||||
taskCode: '',
|
||||
userId: '',
|
||||
});
|
||||
|
||||
const claimPage = reactive<Record<string, any>>({
|
||||
current: 1,
|
||||
records: [],
|
||||
@ -203,13 +182,6 @@ const claimPage = reactive<Record<string, any>>({
|
||||
total: 0,
|
||||
});
|
||||
|
||||
const eventPage = reactive<Record<string, any>>({
|
||||
current: 1,
|
||||
records: [],
|
||||
size: 20,
|
||||
total: 0,
|
||||
});
|
||||
|
||||
const statusMeta = computed(() => {
|
||||
if (!form.configured) {
|
||||
return { color: 'processing', text: '未配置' };
|
||||
@ -590,45 +562,17 @@ async function loadClaimRecords() {
|
||||
}
|
||||
}
|
||||
|
||||
async function loadEvents() {
|
||||
if (!selectedSysOrigin.value) {
|
||||
return;
|
||||
}
|
||||
eventLoading.value = true;
|
||||
try {
|
||||
const result = await pageResidentDailyTaskEvents({
|
||||
...eventQuery,
|
||||
sysOrigin: selectedSysOrigin.value,
|
||||
taskCategory: activeTaskCategory.value,
|
||||
});
|
||||
normalizePage(eventPage, result || {});
|
||||
} finally {
|
||||
eventLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function searchClaimRecords() {
|
||||
claimQuery.cursor = 1;
|
||||
void loadClaimRecords();
|
||||
}
|
||||
|
||||
function searchEvents() {
|
||||
eventQuery.cursor = 1;
|
||||
void loadEvents();
|
||||
}
|
||||
|
||||
function handleClaimTableChange(pagination: Record<string, any>) {
|
||||
claimQuery.cursor = Number(pagination.current || 1);
|
||||
claimQuery.limit = Number(pagination.pageSize || 20);
|
||||
void loadClaimRecords();
|
||||
}
|
||||
|
||||
function handleEventTableChange(pagination: Record<string, any>) {
|
||||
eventQuery.cursor = Number(pagination.current || 1);
|
||||
eventQuery.limit = Number(pagination.pageSize || 20);
|
||||
void loadEvents();
|
||||
}
|
||||
|
||||
watch(
|
||||
sysOriginOptions,
|
||||
(options) => {
|
||||
@ -644,10 +588,8 @@ watch(
|
||||
(value) => {
|
||||
if (value) {
|
||||
claimQuery.cursor = 1;
|
||||
eventQuery.cursor = 1;
|
||||
void loadConfig();
|
||||
void loadClaimRecords();
|
||||
void loadEvents();
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
@ -658,10 +600,8 @@ watch(activeTaskCategory, () => {
|
||||
return;
|
||||
}
|
||||
claimQuery.cursor = 1;
|
||||
eventQuery.cursor = 1;
|
||||
void loadConfig();
|
||||
void loadClaimRecords();
|
||||
void loadEvents();
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -881,46 +821,6 @@ watch(activeTaskCategory, () => {
|
||||
@change="handleClaimTableChange"
|
||||
/>
|
||||
</TabPane>
|
||||
|
||||
<TabPane key="events" tab="事件流水">
|
||||
<div class="toolbar">
|
||||
<Input
|
||||
v-model:value="eventQuery.userId"
|
||||
allow-clear
|
||||
placeholder="用户ID"
|
||||
style="width: 160px"
|
||||
/>
|
||||
<Input
|
||||
v-model:value="eventQuery.taskCode"
|
||||
allow-clear
|
||||
placeholder="任务编码"
|
||||
style="width: 220px"
|
||||
/>
|
||||
<Input
|
||||
v-model:value="eventQuery.eventType"
|
||||
allow-clear
|
||||
placeholder="事件类型"
|
||||
style="width: 220px"
|
||||
/>
|
||||
<Button :loading="eventLoading" type="primary" @click="searchEvents">
|
||||
查询
|
||||
</Button>
|
||||
</div>
|
||||
<Table
|
||||
:columns="eventColumns"
|
||||
:data-source="eventPage.records"
|
||||
:loading="eventLoading"
|
||||
:pagination="{
|
||||
current: eventPage.current,
|
||||
pageSize: eventPage.size,
|
||||
showSizeChanger: true,
|
||||
total: eventPage.total,
|
||||
}"
|
||||
row-key="id"
|
||||
:scroll="{ x: 1500 }"
|
||||
@change="handleEventTableChange"
|
||||
/>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</Card>
|
||||
</Spin>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user