update
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import filer from '../../static/icons/filer.png';
|
||||
import XNav from "../../components/XNav.vue";
|
||||
import {reactive, ref, computed} from "vue";
|
||||
import { reactive, ref, computed } from "vue";
|
||||
import TaskCard from "../../components/TaskCard.vue";
|
||||
import useTableQuery from "../../hooks/useTableQuery.js";
|
||||
import Api from "../../api/index.js";
|
||||
@@ -11,7 +11,7 @@ import XRadioGroup from "../../components/XRadioGroup.vue";
|
||||
import XRadio from "../../components/XRadio.vue";
|
||||
import XDateRange from "../../components/XDateRange.vue";
|
||||
import XAlert from "../../components/XAlert.vue";
|
||||
import {onShow} from "@dcloudio/uni-app";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const taskType = reactive([]);
|
||||
@@ -53,7 +53,7 @@ const vo = reactive({
|
||||
total: 0,
|
||||
});
|
||||
|
||||
const {loading, pagination, initFetchData} = useTableQuery({
|
||||
const { loading, pagination, initFetchData } = useTableQuery({
|
||||
api: Api.system.myTaskList,
|
||||
immediate: false,
|
||||
parameter: po,
|
||||
@@ -62,11 +62,11 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
||||
}
|
||||
});
|
||||
|
||||
Api.system.getTaskType().then(({data}) => {
|
||||
Api.system.getTaskType().then(({ data }) => {
|
||||
taskType.length = 0;
|
||||
taskType.push(...data);
|
||||
});
|
||||
Api.system.getPlatform().then(({data}) => {
|
||||
Api.system.getPlatform().then(({ data }) => {
|
||||
platformType.length = 0;
|
||||
platformType.push(...data);
|
||||
});
|
||||
@@ -85,18 +85,14 @@ onShow(() => {
|
||||
<!--我的任务-->
|
||||
<XNav :show-back="false"></XNav>
|
||||
|
||||
<x-filter
|
||||
v-model:model="po"
|
||||
@init="() => {
|
||||
po.cid = 0;
|
||||
po.pid = 0;
|
||||
po.is_settlement = 0;
|
||||
po.status = 1;
|
||||
po.start_time = dayjs().subtract(1, 'month').format('YYYY-MM-DD');
|
||||
po.end_time = dayjs().format('YYYY-MM-DD');
|
||||
}"
|
||||
@success="initFetchData"
|
||||
v-model:visible="showFilter">
|
||||
<x-filter v-model:model="po" @init="() => {
|
||||
po.cid = 0;
|
||||
po.pid = 0;
|
||||
po.is_settlement = 0;
|
||||
po.status = 1;
|
||||
po.start_time = dayjs().subtract(1, 'month').format('YYYY-MM-DD');
|
||||
po.end_time = dayjs().format('YYYY-MM-DD');
|
||||
}" @success="initFetchData" v-model:visible="showFilter">
|
||||
<x-filter-item label="任务类型">
|
||||
<x-radio-group v-model:model-value="po.cid">
|
||||
<view class="!grid grid-cols-4 gap-[24rpx]">
|
||||
@@ -121,17 +117,12 @@ onShow(() => {
|
||||
</x-radio-group>
|
||||
</x-filter-item>
|
||||
<x-filter-item label="选择时间段">
|
||||
<x-date-range
|
||||
v-model:end-time="po.end_time"
|
||||
v-model:start-time="po.start_time">
|
||||
<x-date-range v-model:end-time="po.end_time" v-model:start-time="po.start_time">
|
||||
</x-date-range>
|
||||
</x-filter-item>
|
||||
</x-filter>
|
||||
|
||||
<scroll-view
|
||||
@refresherpulling="initFetchData()"
|
||||
@scrolltolower="pagination.current++"
|
||||
class="h-[calc(100vh-200rpx)]"
|
||||
<scroll-view @refresherpulling="initFetchData()" @scrolltolower="pagination.page++" class="h-[calc(100vh-200rpx)]"
|
||||
scroll-y>
|
||||
<view class="relative">
|
||||
<view class="!w-full !h-[414rpx] bg-[var(--primary-color)] bor-b-r !absolute">
|
||||
@@ -142,8 +133,7 @@ onShow(() => {
|
||||
<view class="!w-full text-center !flex justify-center items-center">全部平台</view>
|
||||
<view class="!w-full text-center !flex justify-center items-center">全部状态</view>
|
||||
<view class="!w-full text-center !flex justify-center items-center">
|
||||
<view
|
||||
@click="showFilter=true"
|
||||
<view @click="showFilter = true"
|
||||
class="!flex items-center justify-center gap-[10rpx] !py-[10rpx] !px-[30rpx] bg-[#0E42D2] rounded-[8rpx]">
|
||||
<image class="!w-[22rpx] !h-[22rpx]" :src="filer"></image>
|
||||
筛选
|
||||
@@ -192,7 +182,7 @@ onShow(() => {
|
||||
根据您的任务完成情况
|
||||
</view>
|
||||
<view style="font-size: 28rpx;font-weight: 400"
|
||||
class="text-[rgb(78,89,105)] !mt-[10rpx]">
|
||||
class="text-[rgb(78,89,105)] !mt-[10rpx]">
|
||||
实际获得的收益
|
||||
</view>
|
||||
</template>
|
||||
@@ -205,10 +195,8 @@ onShow(() => {
|
||||
</view>
|
||||
|
||||
<view class="!grid grid-cols-4 gap-[20rpx] !px-[20rpx] bg-[#F2F3F5] py-[20rpx]">
|
||||
<view
|
||||
v-for="(item, index) in tabs"
|
||||
@click="changeCurrent(item)"
|
||||
:class="['rounded-full bg-[#fff] text-center !py-[8rpx] !text-[13px] duration-500', po.status===item.value ? 'current' : '', vo[`count${index+1}`] > 0 ? 'badge' : '']">
|
||||
<view v-for="(item, index) in tabs" @click="changeCurrent(item)"
|
||||
:class="['rounded-full bg-[#fff] text-center !py-[8rpx] !text-[13px] duration-500', po.status === item.value ? 'current' : '', vo[`count${index + 1}`] > 0 ? 'badge' : '']">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user