update
This commit is contained in:
@@ -1,15 +1,40 @@
|
||||
<script setup>
|
||||
import {ref} from 'vue';
|
||||
import {reactive, ref, watch} from 'vue';
|
||||
import Api from "../../../../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const emits = defineEmits(['success']);
|
||||
const {id} = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
}
|
||||
});
|
||||
const visible = ref(false);
|
||||
const detail = reactive({});
|
||||
const activeKey = ref(1);
|
||||
|
||||
const success = () => {
|
||||
watch(
|
||||
() => visible.value,
|
||||
(val) => {
|
||||
if (val) Api.admin.getTaskChildrenInfo(id).then(({data}) => {
|
||||
Object.assign(detail, data);
|
||||
console.log('我看看我看看', data);
|
||||
});
|
||||
},
|
||||
{deep: true}
|
||||
)
|
||||
|
||||
const passTaskChildren = async () => {
|
||||
const {code, msg} = await Api.admin.passTaskChildren(id);
|
||||
if (code === 1) Message.success(msg);
|
||||
emits('success');
|
||||
}
|
||||
|
||||
const refuse = () => {
|
||||
|
||||
const refuseTaskChildren = async () => {
|
||||
const {code, msg} = await Api.admin.refuseTaskChildren(id);
|
||||
if (code === 1) Message.success(msg);
|
||||
emits('success');
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -20,45 +45,53 @@ const refuse = () => {
|
||||
title-align="start"
|
||||
title="预览"
|
||||
v-model:visible="visible">
|
||||
<a-tabs v-model:active-key="activeKey" type="rounded">
|
||||
<a-tab-pane v-for="item in 3" :title="`素材${item}`" :key="item">
|
||||
<a-tabs v-model:active-key="activeKey" type="rounded" v-if="detail.id !== undefined && detail.id !== null">
|
||||
<a-tab-pane v-for="(item, index) in detail.content" :title="`素材${index+1}`" :key="index">
|
||||
<a-form
|
||||
layout="vertical">
|
||||
<a-form-item label="标题">
|
||||
<a-input model-value="终于让我给发现啦!就这个再加上芙贝柔一起绝了!"></a-input>
|
||||
<a-input :model-value="item.title"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="正文">
|
||||
<a-textarea
|
||||
auto-size
|
||||
:max-length="1000"
|
||||
show-word-limit
|
||||
model-value="终于让我给发现啦!就这个再加上芙贝柔一起绝了!终于让我给发现啦!就这个再加上芙贝柔一起绝风格反对赌东道赌东道了!终于让我给发现啦!就这个再加上芙贝柔一起绝了!就这个再加...">
|
||||
:model-value="item.content">
|
||||
</a-textarea>
|
||||
</a-form-item>
|
||||
<a-form-item label="话题">
|
||||
<div id="tag-list" class="w-full bg-[var(--color-neutral-2)] p-[4px]">
|
||||
<a-tag>#一起变美</a-tag>
|
||||
<a-tag v-for="v in item.tags_arr">#{{ v }}</a-tag>
|
||||
</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="素材">
|
||||
<a-image
|
||||
width="60px"
|
||||
height="60px"
|
||||
src="https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp">
|
||||
</a-image>
|
||||
<div class="flex flex-wrap gap-[16px]">
|
||||
<a-image
|
||||
v-for="v in item.materia_arr"
|
||||
width="60px"
|
||||
height="60px"
|
||||
:src="v">
|
||||
</a-image>
|
||||
</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="评论区内容">
|
||||
<div class="flex flex-col gap-[8px] w-full">
|
||||
<div class="w-full flex gap-[10px] items-center">
|
||||
1.
|
||||
<div class="w-full flex gap-[10px] items-center" v-for="v in detail.comment">
|
||||
{{ v.id }}.
|
||||
<div class="flex-grow bg-[var(--color-neutral-2)] p-[4px] h-[40px] flex items-center">
|
||||
<div class="text-[#4E5969] text-[14px] mr-[4px]" v-if="v.pid !== 0">
|
||||
<icon-redo/>
|
||||
回复{{ v.pid }}:
|
||||
</div>
|
||||
<a-image
|
||||
v-if="v.image"
|
||||
class="mr-[12px]"
|
||||
width="30px"
|
||||
height="30px"
|
||||
src="https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp">
|
||||
:src="v.image">
|
||||
</a-image>
|
||||
第三个很好用,大家可以在网上搜同款
|
||||
</div>
|
||||
@@ -71,14 +104,14 @@ const refuse = () => {
|
||||
|
||||
<template #footer>
|
||||
<div class="flex items-center gap-[8px]">
|
||||
<a-radio-group>
|
||||
<template v-for="item in 3" :key="item">
|
||||
<a-radio v-show="activeKey === item" :value="item">选中</a-radio>
|
||||
<a-checkbox-group>
|
||||
<template v-for="(item, index) in detail.content" :key="item">
|
||||
<a-checkbox v-show="activeKey === index" :value="item">选中</a-checkbox>
|
||||
</template>
|
||||
</a-radio-group>
|
||||
</a-checkbox-group>
|
||||
|
||||
<a-button @click="success" type="primary" class="ml-auto">通过</a-button>
|
||||
<a-button @click="refuse">拒绝</a-button>
|
||||
<a-button @click="passTaskChildren" type="primary" class="ml-auto">通过</a-button>
|
||||
<a-button @click="refuseTaskChildren">拒绝</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</a-modal>
|
||||
|
||||
@@ -1,12 +1,32 @@
|
||||
<script setup>
|
||||
import {ref, reactive} from "vue";
|
||||
import XSelect from '../../../../../components/XSelect/index.vue';
|
||||
import {reactive, ref} from "vue";
|
||||
import Api from "../../../../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const {id, api} = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
api: {
|
||||
type: Function,
|
||||
default: Api.admin.refuseTask
|
||||
}
|
||||
});
|
||||
const emits = defineEmits(['success']);
|
||||
const visible = ref(false);
|
||||
const form = reactive({
|
||||
state: ''
|
||||
content: ''
|
||||
});
|
||||
|
||||
const success = async () => {
|
||||
const {code, msg} = await api({
|
||||
id: id,
|
||||
...form
|
||||
});
|
||||
if (code === 1) Message.success(msg);
|
||||
emits('success');
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -15,10 +35,11 @@ const form = reactive({
|
||||
<a-modal
|
||||
title-align="start"
|
||||
title="任务审核拒绝"
|
||||
@ok="success"
|
||||
v-model:visible="visible">
|
||||
<a-form :model="form">
|
||||
<a-form-item label="拒绝原因">
|
||||
<XSelect :api="Api.system.getSelect" placeholder="请输入拒绝原因"></XSelect>
|
||||
<a-input v-model:model-value="form.content" placeholder="请输入拒绝原因"></a-input>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
@@ -1,30 +1,64 @@
|
||||
<script setup>
|
||||
import XSelect from "../../../../../components/XSelect/index.vue";
|
||||
import {ref, reactive} from "vue";
|
||||
import {reactive, ref, watch} from "vue";
|
||||
import Api from "../../../../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const {id} = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
});
|
||||
const emits = defineEmits(['success']);
|
||||
const visible = ref(false);
|
||||
const form = reactive({
|
||||
name: null,
|
||||
id: null,
|
||||
real_price: null,
|
||||
security_level: null,
|
||||
time_level: null,
|
||||
});
|
||||
|
||||
watch(
|
||||
() => visible.value,
|
||||
(val) => {
|
||||
if (val) {
|
||||
Api.admin.getTaskDetail(id).then(({data}) => {
|
||||
form.id = data.id;
|
||||
form.real_price = data.real_price;
|
||||
form.security_level = data.security_level;
|
||||
form.time_level = data.time_level;
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
}
|
||||
)
|
||||
|
||||
const success = async () => {
|
||||
const {msg, code} = await Api.admin.passTask(form);
|
||||
if (code === 1) Message.success(msg);
|
||||
emits('success');
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-link :hoverable="false" status="success" @click="visible=true">通过</a-link>
|
||||
|
||||
<a-modal
|
||||
@ok="success"
|
||||
title-align="start"
|
||||
title="任务审核通过"
|
||||
v-model:visible="visible">
|
||||
<a-form :model="form" layout="vertical">
|
||||
<a-form-item label="该任务对达人端的展示价格为:">
|
||||
<XSelect :api="Api.system.getSelect"></XSelect>
|
||||
<a-input v-model:model-value="form.real_price" placeholder="请输入价格"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="安全评分">
|
||||
<XSelect :api="Api.system.getSelect" placeholder="请输入安全评分,满分100"></XSelect>
|
||||
<a-input v-model:model-value="form.security_level" placeholder="请输入安全评分,满分100"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="耗时评分">
|
||||
<XSelect :api="Api.system.getSelect" placeholder="请输入耗时评分,满分100"></XSelect>
|
||||
<a-input v-model:model-value="form.time_level" placeholder="请输入耗时评分,满分100"></a-input>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<script setup>
|
||||
import {reactive, ref} from "vue";
|
||||
import {reactive} from "vue";
|
||||
import Filter from "../../../../components/Filter/index.vue";
|
||||
import useTableQuery from "../../../../hooks/useTableQuery.js";
|
||||
import Api from "../../../../api/index.js";
|
||||
import RejectTaskModal from "./components/RejectTaskModal.vue";
|
||||
import TaskPassedReviewModal from "./components/TaskPassedReviewModal.vue";
|
||||
import PreviewTaskModal from "./components/PreviewTaskModal.vue";
|
||||
import openTerminateTask from "../../../../components/TerminateTask/TerminateTask.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
import RejectTaskModal from "./components/RejectTaskModal.vue";
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '任务编号',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'code',
|
||||
},
|
||||
{
|
||||
title: '子任务编号',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'uid',
|
||||
},
|
||||
{
|
||||
title: '子任务状态',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'status_text',
|
||||
},
|
||||
{
|
||||
title: '平台审核状态',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'check_status_text',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@@ -50,44 +50,18 @@ const FilterConfig = [
|
||||
type: 'select',
|
||||
label: '平台审核状态',
|
||||
placeholder: '请选择平台审核状态',
|
||||
api: async () => ({
|
||||
data: [
|
||||
{
|
||||
name: '选项一',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: '选项二',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '选项三',
|
||||
id: 3,
|
||||
},
|
||||
]
|
||||
}),
|
||||
api: async () => {
|
||||
return await Api.admin.getSubCheckStatusList();
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
type: 'select',
|
||||
label: '子任务状态',
|
||||
placeholder: '请选择子任务状态',
|
||||
api: async () => ({
|
||||
data: [
|
||||
{
|
||||
name: '选项一',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: '选项二',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '选项三',
|
||||
id: 3,
|
||||
},
|
||||
]
|
||||
}),
|
||||
api: async () => {
|
||||
return await Api.admin.getStatusList();
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
@@ -106,14 +80,26 @@ const vo = reactive({
|
||||
total: 0,
|
||||
});
|
||||
|
||||
const {loading, pagination, initFetchData} = useTableQuery({
|
||||
const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
||||
parameter: po,
|
||||
api: Api.system.getData,
|
||||
api: Api.admin.getTaskChildrenList,
|
||||
callback: (data) => {
|
||||
Object.assign(vo, data);
|
||||
console.log(vo);
|
||||
}
|
||||
});
|
||||
|
||||
const passTaskChildren = async (id) => {
|
||||
const {code, msg} = await Api.admin.passTaskChildren(id);
|
||||
if (code === 1) Message.success(msg);
|
||||
await fetchData();
|
||||
}
|
||||
|
||||
const refuseTaskChildren = async (id) => {
|
||||
const {code, msg} = await Api.admin.refuseTaskChildren(id);
|
||||
if (code === 1) Message.success(msg);
|
||||
await fetchData();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -121,6 +107,7 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
||||
<a-card>
|
||||
<Filter
|
||||
v-model:from="po"
|
||||
@search="initFetchData"
|
||||
:config="FilterConfig">
|
||||
</Filter>
|
||||
|
||||
@@ -131,11 +118,17 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
class="flex-grow">
|
||||
<template v-slot:action>
|
||||
<template v-slot:action="{record}">
|
||||
<div class="flex items-center gap-[20px] justify-between">
|
||||
<PreviewTaskModal></PreviewTaskModal>
|
||||
<TaskPassedReviewModal></TaskPassedReviewModal>
|
||||
<RejectTaskModal></RejectTaskModal>
|
||||
<PreviewTaskModal :id="record.id" @success="fetchData"></PreviewTaskModal>
|
||||
<a-popconfirm content="确定通过?" @ok="passTaskChildren(record.id)">
|
||||
<a-link :hoverable="false" status="success">通过</a-link>
|
||||
</a-popconfirm>
|
||||
<RejectTaskModal
|
||||
:api="Api.admin.refuseTaskChildren"
|
||||
:id="record.id"
|
||||
@success="fetchData">
|
||||
</RejectTaskModal>
|
||||
<a-link :hoverable="false" status="danger" @click="openTerminateTask">终止子任务</a-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -10,43 +10,43 @@ import TerminateTask from "../../../../components/TerminateTask/TerminateTask.js
|
||||
const columns = [
|
||||
{
|
||||
title: '任务编号',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'code',
|
||||
},
|
||||
{
|
||||
title: '任务名称',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'goods_name',
|
||||
},
|
||||
{
|
||||
title: '发布渠道',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'platform_name',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'createtime',
|
||||
},
|
||||
{
|
||||
title: '子任务数',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'children_num',
|
||||
},
|
||||
{
|
||||
title: '子任务报价',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'children_price',
|
||||
},
|
||||
{
|
||||
title: '商家ID',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'b_uid',
|
||||
},
|
||||
{
|
||||
title: '平台报价',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'real_price',
|
||||
},
|
||||
{
|
||||
title: '平台审核状态',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'check_status_text',
|
||||
},
|
||||
{
|
||||
title: '商家任务状态',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'status_text',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@@ -57,19 +57,19 @@ const columns = [
|
||||
];
|
||||
const FilterConfig = [
|
||||
{
|
||||
key: 'wd',
|
||||
key: 'uid',
|
||||
type: 'input',
|
||||
label: '商家ID',
|
||||
placeholder: '请输入商家ID',
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
key: 'name',
|
||||
type: 'input',
|
||||
label: '任务名称',
|
||||
placeholder: '请输入任务名称',
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
key: 'platform',
|
||||
type: 'select',
|
||||
label: '任务渠道',
|
||||
placeholder: '请选择任务渠道',
|
||||
@@ -78,21 +78,23 @@ const FilterConfig = [
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
key: 'status',
|
||||
type: 'select',
|
||||
label: '任务状态',
|
||||
placeholder: '请选择任务状态',
|
||||
api: async () => {
|
||||
return await Api.admin.getTaskList();
|
||||
return await Api.admin.getTaskStatusList();
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
key: 'datetime',
|
||||
start: 'start_time',
|
||||
end: 'end_time',
|
||||
type: 'datetime',
|
||||
label: '创建时间',
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
key: 'check_status',
|
||||
type: 'select',
|
||||
label: '审核状态',
|
||||
placeholder: '请选择审核状态',
|
||||
@@ -103,7 +105,13 @@ const FilterConfig = [
|
||||
];
|
||||
|
||||
const po = reactive({
|
||||
wd: null,
|
||||
uid: null,
|
||||
status: null,
|
||||
check_status: null,
|
||||
platform: null,
|
||||
name: null,
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
});
|
||||
const vo = reactive({
|
||||
page: '',
|
||||
@@ -111,12 +119,11 @@ const vo = reactive({
|
||||
total: 0,
|
||||
});
|
||||
|
||||
const {loading, pagination, initFetchData} = useTableQuery({
|
||||
const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
||||
parameter: po,
|
||||
api: Api.system.getData,
|
||||
api: Api.admin.getTaskList,
|
||||
callback: (data) => {
|
||||
Object.assign(vo, data);
|
||||
console.log(vo);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -125,6 +132,7 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
||||
<!-- 任务审核 -->
|
||||
<a-card>
|
||||
<Filter
|
||||
@search="initFetchData"
|
||||
v-model:from="po"
|
||||
:config="FilterConfig">
|
||||
</Filter>
|
||||
@@ -136,12 +144,14 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
class="flex-grow">
|
||||
<template v-slot:action>
|
||||
<template v-slot:action="{record}">
|
||||
<div class="flex items-center gap-[20px]">
|
||||
<a-link :hoverable="false">编辑</a-link>
|
||||
<TaskPassedReviewModal></TaskPassedReviewModal>
|
||||
<RejectTaskModal></RejectTaskModal>
|
||||
<a-link :hoverable="false" status="danger" class="ml-auto" @click="TerminateTask">终止</a-link>
|
||||
<TaskPassedReviewModal :id="record.id" @success="fetchData"></TaskPassedReviewModal>
|
||||
<RejectTaskModal :id="record.id" @success="fetchData"></RejectTaskModal>
|
||||
<a-link :hoverable="false" status="danger" class="ml-auto"
|
||||
@click="TerminateTask({taskId: record.id})">终止
|
||||
</a-link>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
Reference in New Issue
Block a user