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) {
|
export async function getVoiceRoomRedPacketConfig(sysOrigin: string) {
|
||||||
return requestClient.get<Record<string, any>>(`${VOICE_ROOM_RED_PACKET_BASE}/config`, {
|
return requestClient.get<Record<string, any>>(`${VOICE_ROOM_RED_PACKET_BASE}/config`, {
|
||||||
params: { sysOrigin },
|
params: { sysOrigin },
|
||||||
|
|||||||
@ -24,7 +24,6 @@ import {
|
|||||||
import {
|
import {
|
||||||
getResidentDailyTaskConfig,
|
getResidentDailyTaskConfig,
|
||||||
pageResidentDailyTaskClaimRecords,
|
pageResidentDailyTaskClaimRecords,
|
||||||
pageResidentDailyTaskEvents,
|
|
||||||
saveResidentDailyTaskConfig,
|
saveResidentDailyTaskConfig,
|
||||||
} from '#/api/legacy/resident-activity';
|
} from '#/api/legacy/resident-activity';
|
||||||
import { getAllowedSysOrigins } from '#/views/system/shared';
|
import { getAllowedSysOrigins } from '#/views/system/shared';
|
||||||
@ -143,17 +142,6 @@ const claimColumns = [
|
|||||||
{ dataIndex: 'createTime', key: 'createTime', title: '创建时间', width: 180 },
|
{ 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 accessStore = useAccessStore();
|
||||||
const sysOriginOptions = computed(() => {
|
const sysOriginOptions = computed(() => {
|
||||||
const options = getAllowedSysOrigins(accessStore.accessCodes || []);
|
const options = getAllowedSysOrigins(accessStore.accessCodes || []);
|
||||||
@ -166,7 +154,6 @@ const activeTab = ref('config');
|
|||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const saving = ref(false);
|
const saving = ref(false);
|
||||||
const claimLoading = ref(false);
|
const claimLoading = ref(false);
|
||||||
const eventLoading = ref(false);
|
|
||||||
|
|
||||||
const form = reactive<Record<string, any>>({
|
const form = reactive<Record<string, any>>({
|
||||||
conditionJumps: [],
|
conditionJumps: [],
|
||||||
@ -188,14 +175,6 @@ const claimQuery = reactive<Record<string, any>>({
|
|||||||
userId: '',
|
userId: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
const eventQuery = reactive<Record<string, any>>({
|
|
||||||
cursor: 1,
|
|
||||||
eventType: '',
|
|
||||||
limit: 20,
|
|
||||||
taskCode: '',
|
|
||||||
userId: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
const claimPage = reactive<Record<string, any>>({
|
const claimPage = reactive<Record<string, any>>({
|
||||||
current: 1,
|
current: 1,
|
||||||
records: [],
|
records: [],
|
||||||
@ -203,13 +182,6 @@ const claimPage = reactive<Record<string, any>>({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const eventPage = reactive<Record<string, any>>({
|
|
||||||
current: 1,
|
|
||||||
records: [],
|
|
||||||
size: 20,
|
|
||||||
total: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
const statusMeta = computed(() => {
|
const statusMeta = computed(() => {
|
||||||
if (!form.configured) {
|
if (!form.configured) {
|
||||||
return { color: 'processing', text: '未配置' };
|
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() {
|
function searchClaimRecords() {
|
||||||
claimQuery.cursor = 1;
|
claimQuery.cursor = 1;
|
||||||
void loadClaimRecords();
|
void loadClaimRecords();
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchEvents() {
|
|
||||||
eventQuery.cursor = 1;
|
|
||||||
void loadEvents();
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleClaimTableChange(pagination: Record<string, any>) {
|
function handleClaimTableChange(pagination: Record<string, any>) {
|
||||||
claimQuery.cursor = Number(pagination.current || 1);
|
claimQuery.cursor = Number(pagination.current || 1);
|
||||||
claimQuery.limit = Number(pagination.pageSize || 20);
|
claimQuery.limit = Number(pagination.pageSize || 20);
|
||||||
void loadClaimRecords();
|
void loadClaimRecords();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleEventTableChange(pagination: Record<string, any>) {
|
|
||||||
eventQuery.cursor = Number(pagination.current || 1);
|
|
||||||
eventQuery.limit = Number(pagination.pageSize || 20);
|
|
||||||
void loadEvents();
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
sysOriginOptions,
|
sysOriginOptions,
|
||||||
(options) => {
|
(options) => {
|
||||||
@ -644,10 +588,8 @@ watch(
|
|||||||
(value) => {
|
(value) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
claimQuery.cursor = 1;
|
claimQuery.cursor = 1;
|
||||||
eventQuery.cursor = 1;
|
|
||||||
void loadConfig();
|
void loadConfig();
|
||||||
void loadClaimRecords();
|
void loadClaimRecords();
|
||||||
void loadEvents();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
@ -658,10 +600,8 @@ watch(activeTaskCategory, () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
claimQuery.cursor = 1;
|
claimQuery.cursor = 1;
|
||||||
eventQuery.cursor = 1;
|
|
||||||
void loadConfig();
|
void loadConfig();
|
||||||
void loadClaimRecords();
|
void loadClaimRecords();
|
||||||
void loadEvents();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -881,46 +821,6 @@ watch(activeTaskCategory, () => {
|
|||||||
@change="handleClaimTableChange"
|
@change="handleClaimTableChange"
|
||||||
/>
|
/>
|
||||||
</TabPane>
|
</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>
|
</Tabs>
|
||||||
</Card>
|
</Card>
|
||||||
</Spin>
|
</Spin>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user