This commit is contained in:
2025-06-16 20:54:42 +08:00
parent 88a8d119cf
commit 021918e56d
8 changed files with 63 additions and 49 deletions

View File

@@ -16,30 +16,31 @@ const taskType = reactive([]);
const platformType = reactive([]);
const tabs = [
{
name: '发布问题',
value: 0,
},
{
name: '抖音问题',
name: '进行中',
value: 1,
},
{
name: '结算问题',
name: '审核中',
value: 2,
},
{
name: '提现问题',
name: '已失效',
value: -1,
},
{
name: '已完成',
value: 3,
},
];
const current = ref(0);
const showFilter = ref(false);
const sumPo = reactive({
type: 0,
startTime: null,
endTime: null,
const po = reactive({
status: 1,
cid: 0,
pid: 0,
is_settlement: 0,
end_time: null,
start_time: null,
});
const po = reactive({});
const vo = reactive({
page: '',
rows: [],
@@ -50,9 +51,7 @@ const {loading, pagination, initFetchData} = useTableQuery({
api: Api.system.myTaskList,
parameter: po,
callback: (data) => {
vo.page = data.page;
vo.total = data.total;
vo.rows = [...vo.rows, ...data.rows];
Object.assign(vo, data);
}
});
@@ -64,6 +63,11 @@ Api.system.getPlatform().then(({data}) => {
platformType.length = 0;
platformType.push(...data);
});
const changeCurrent = async (item) => {
po.status = item.value;
await initFetchData();
}
</script>
<template>
@@ -71,24 +75,25 @@ Api.system.getPlatform().then(({data}) => {
<XNav :show-back="false"></XNav>
<x-filter
v-model:model="sumPo"
v-model:model="po"
@success="initFetchData"
v-model:visible="showFilter">
<x-filter-item label="任务类型">
<x-radio-group v-model:model-value="sumPo.type">
<x-radio-group v-model:model-value="po.cid">
<view class="!grid grid-cols-4 gap-[24rpx]">
<x-radio v-for="v in taskType" :key="v.id" :value="v.id">{{ v.name }}</x-radio>
</view>
</x-radio-group>
</x-filter-item>
<x-filter-item label="发布平台">
<x-radio-group v-model:model-value="sumPo.type">
<x-radio-group v-model:model-value="po.pid">
<view class="!grid grid-cols-4 gap-[24rpx]">
<x-radio v-for="v in platformType" :key="v.id" :value="v.id">{{ v.name }}</x-radio>
</view>
</x-radio-group>
</x-filter-item>
<x-filter-item label="结算状态">
<x-radio-group v-model:model-value="sumPo.type">
<x-radio-group v-model:model-value="po.is_settlement">
<view class="!grid grid-cols-4 gap-[24rpx]">
<x-radio :value="0">全部状态</x-radio>
<x-radio :value="1">未结算</x-radio>
@@ -98,8 +103,8 @@ Api.system.getPlatform().then(({data}) => {
</x-filter-item>
<x-filter-item label="选择时间段">
<x-date-range
v-model:end-time="sumPo.endTime"
v-model:start-time="sumPo.startTime">
v-model:end-time="po.end_time"
v-model:start-time="po.start_time">
</x-date-range>
</x-filter-item>
</x-filter>
@@ -138,17 +143,17 @@ Api.system.getPlatform().then(({data}) => {
<view
class="!w-full !h-[146rpx] bg-[#E8F3FF] !py-[24rpx] !px-[32rpx] box-border !flex flex-col justify-between rounded-[12rpx]">
<view class="block-title">接受任务数</view>
<view class="block-value">10</view>
<view class="block-value">{{ vo.total }}</view>
</view>
<view
class="!w-full !h-[146rpx] bg-[#E8F3FF] !py-[24rpx] !px-[32rpx] box-border !flex flex-col justify-between rounded-[12rpx]">
<view class="block-title">预估收益()</view>
<view class="block-value">45.00</view>
<view class="block-value">{{ vo.count.toFixed(2) }}</view>
</view>
<view
class="!w-full !h-[146rpx] !bg-[#E8FFEA] !py-[24rpx] !px-[32rpx] box-border !flex flex-col justify-between rounded-[12rpx]">
<view class="block-title">完成任务数</view>
<view class="block-value">4</view>
<view class="block-value">{{ vo.complete }}</view>
</view>
<view
class="!w-full !h-[146rpx] !bg-[#E8FFEA] !py-[24rpx] !px-[32rpx] box-border !flex flex-col justify-between rounded-[12rpx]">
@@ -170,7 +175,7 @@ Api.system.getPlatform().then(({data}) => {
</template>
</x-alert>
</view>
<view class="block-value">5.60</view>
<view class="block-value">{{ vo.real_coin.toFixed(2) }}</view>
</view>
</view>
</view>
@@ -179,8 +184,8 @@ Api.system.getPlatform().then(({data}) => {
<view class="!grid grid-cols-4 gap-[20rpx] !px-[20rpx] bg-[#F2F3F5] py-[20rpx]">
<view
v-for="item in tabs"
@click="current=item.value"
:class="['rounded-full bg-[#fff] text-center !py-[8rpx] !text-[13px] duration-500', current===item.value ? 'current' : '']">
@click="changeCurrent(item)"
:class="['rounded-full bg-[#fff] text-center !py-[8rpx] !text-[13px] duration-500', po.status===item.value ? 'current' : '']">
{{ item.name }}
</view>
</view>