This commit is contained in:
王一嘉
2025-07-18 20:36:00 +08:00
parent bdb05623e9
commit 50a85dd274

View File

@@ -5,6 +5,7 @@ import {getCurrentInstance, nextTick, onMounted, reactive, ref, watch} from "vue
import PlatformENUM from "../enum/PlatformENUM";
import Api from "../api/index";
import {showToast, toPage} from "../utils/uils";
import {debounce} from "lodash";
const emits = defineEmits(['success']);
const {details} = defineProps({
@@ -71,7 +72,7 @@ watch(
{deep: true}
)
const success = async () => {
const success = debounce(async () => {
if (!selected.value) {
showToast('请选择帐号');
return;
@@ -84,7 +85,7 @@ const success = async () => {
show.value = false;
await toPage(`/pages/taskDetails/index?id=${task_id}&task_children_id=${task_children_id}&delta=999`)
emits('success');
}
}, 500);
</script>
<template>
@@ -112,31 +113,33 @@ const success = async () => {
<view class="!mt-[20rpx] px-[16rpx]">
<template v-if="vo.length > 0">
<view
:key="index"
@click="v.is_use !== 0 && po.status === 0 ? selected = v.id : null"
v-for="(v, index) in vo"
class="!flex items-center py-[22rpx]">
<view class="relative">
<radio
@focus="(e) => {console.log(e)}"
:checked="selected === v.id"
:disabled="v.is_use === 0 || po.status>0">
</radio>
<view @click="v.is_use !== 0 && po.status === 0 ? selected = v.id : null"
class="!size-full absolute left-0 top-0"></view>
<scroll-view style="height: 30vh" scroll-y>
<view
:key="index"
@click="v.is_use !== 0 && po.status === 0 ? selected = v.id : null"
v-for="(v, index) in vo"
class="!flex items-center py-[22rpx]">
<view class="relative">
<radio
@focus="(e) => {console.log(e)}"
:checked="selected === v.id"
:disabled="v.is_use === 0 || po.status>0">
</radio>
<view @click="v.is_use !== 0 && po.status === 0 ? selected = v.id : null"
class="!size-full absolute left-0 top-0"></view>
</view>
<image class="!size-[80rpx] rounded-[50%] overflow-hidden !ml-[34rpx]"
:src="PlatformENUM[v.platform_id]"></image>
<view class="!flex flex-col !ml-[16rpx]">
<view class="test-28r">{{ v.nickname }}</view>
<view class="text-[#86909C] test-24r">{{ v.account }}</view>
</view>
<view class="text-[#4E5969] test-24r bg-[#F2F3F5] rounded-[4rpx] !ml-auto"
v-if="v.is_use === 0">
今日已接其他任务
</view>
</view>
<image class="!size-[80rpx] rounded-[50%] overflow-hidden !ml-[34rpx]"
:src="PlatformENUM[v.platform_id]"></image>
<view class="!flex flex-col !ml-[16rpx]">
<view class="test-28r">{{ v.nickname }}</view>
<view class="text-[#86909C] test-24r">{{ v.account }}</view>
</view>
<view class="text-[#4E5969] test-24r bg-[#F2F3F5] rounded-[4rpx] !ml-auto"
v-if="v.is_use === 0">
今日已接其他任务
</view>
</view>
</scroll-view>
</template>
<template v-else>