update
This commit is contained in:
@@ -79,6 +79,13 @@ const addIntervention = async () => {
|
||||
await fetchData();
|
||||
emits('success')
|
||||
}
|
||||
|
||||
const intervention = async () => {
|
||||
const {msg} = await Api.merchant.intervention({...form, id: task.id});
|
||||
Message.success(msg);
|
||||
await fetchData();
|
||||
emits('success')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -114,7 +121,7 @@ const addIntervention = async () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="SystemStore.isRoot && vo.info?.id" class="flex justify-center">
|
||||
<div v-if="vo.info?.id" class="flex justify-center">
|
||||
<a-card class="w-[528px]" title="达人发起了平台介入" :header-style="{textAlign: 'center'}">
|
||||
<div class="font-bold text-[#1D2129] mb-[6px]">达人申诉理由:</div>
|
||||
<div class="px-[16px] py-[12px] bg-[#F7F8FA]">
|
||||
@@ -126,7 +133,7 @@ const addIntervention = async () => {
|
||||
</div>
|
||||
</div>
|
||||
<div class="font-bold text-[#1D2129] mt-[20px] mb-[6px]">平台处理结果:</div>
|
||||
<div id="ROOT" class="flex flex-col justify-center items-center">
|
||||
<div id="ROOT" class="flex flex-col justify-center items-center" v-if="SystemStore.isRoot">
|
||||
<a-textarea v-model:model-value="form.content" class="w-full h-[140px]"
|
||||
placeholder="输入平台介入结果"></a-textarea>
|
||||
<div class="flex flex-wrap gap-[16px] mt-[10px] mr-auto">
|
||||
@@ -147,6 +154,14 @@ const addIntervention = async () => {
|
||||
</div>
|
||||
<a-button type="primary" class="mt-[10px]" @click="addIntervention">平台介入</a-button>
|
||||
</div>
|
||||
<div v-else class="px-[16px] py-[12px] bg-[#F7F8FA]">
|
||||
<div>
|
||||
{{ vo.info.intro }}
|
||||
</div>
|
||||
<div class="grid grid-cols-5 gap-[12px] mt-[4px]">
|
||||
<x-image hideDelete v-for="v in vo.info.intro_image_arr" :src="v"></x-image>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</div>
|
||||
@@ -165,7 +180,7 @@ const addIntervention = async () => {
|
||||
</template>
|
||||
发送
|
||||
</a-button>
|
||||
<a-button class="absolute right-[110px] bottom-[12px] z-[2]">
|
||||
<a-button class="absolute right-[110px] bottom-[12px] z-[2]" @click="intervention">
|
||||
<template #icon>
|
||||
<icon-robot/>
|
||||
</template>
|
||||
|
||||
@@ -5,7 +5,9 @@ import Information from "./Information.vue";
|
||||
import dayjs from "dayjs";
|
||||
import Api from "../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
import {useSystemStore} from "../../pinia/SystemStore/index.js";
|
||||
|
||||
const SystemStore = useSystemStore();
|
||||
const InformationRef = ref();
|
||||
const {task} = defineProps({
|
||||
task: {
|
||||
@@ -57,16 +59,18 @@ const changeStatus = async () => {
|
||||
</div>
|
||||
<div class="w-[280px] h-auto flex flex-col bg-[#F2F3F5] gap-[20px]" v-if="task">
|
||||
<div class="bg-white p-[20px]">
|
||||
<div class="mb-[20px] text-[16px]">进度管理</div>
|
||||
<x-select v-model:model-value="task.is_reply" placeholder="待回复" :api="getStatus"
|
||||
@change="changeStatus" :init="true"></x-select>
|
||||
<a-divider></a-divider>
|
||||
<template v-if="!SystemStore.isRoot">
|
||||
<div class="mb-[20px] text-[16px]">进度管理</div>
|
||||
<x-select v-model:model-value="task.is_reply" placeholder="待回复" :api="getStatus"
|
||||
@change="changeStatus" :init="true"></x-select>
|
||||
<a-divider></a-divider>
|
||||
</template>
|
||||
<div class="mb-[20px] text-[16px]">进度管理</div>
|
||||
<div class="grid grid-cols-2 gap-y-[12px]">
|
||||
<div class="text-[#86909C]">创建时间</div>
|
||||
<div class="#1D2129">{{ dayjs(task.createtime * 1000).format('MM-DD HH:mm') }}</div>
|
||||
<div class="text-[#86909C]">任务编号</div>
|
||||
<div class="#1D2129">{{ task.taskcode }}</div>
|
||||
<div class="#1D2129">{{ task?.taskcode || task.m_code }}</div>
|
||||
<div class="text-[#86909C]">子任务编号</div>
|
||||
<div class="#1D2129">{{ task.uid }}</div>
|
||||
<div class="text-[#86909C]">子任务状态</div>
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
import {computed} from "vue";
|
||||
import Api from "../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
import {useSystemStore} from "../../pinia/SystemStore/index.js";
|
||||
|
||||
const emits = defineEmits(['success']);
|
||||
const SystemStore = useSystemStore();
|
||||
const {data, hideDelete} = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -16,7 +18,8 @@ const {data, hideDelete} = defineProps({
|
||||
});
|
||||
const list = computed(() => data?.flatMap(v => v.children ? [v, ...v.children] : [v]));
|
||||
const del = async (id) => {
|
||||
const {msg} = await Api.merchant.delChildrenComment(id);
|
||||
const api = SystemStore.isRoot ? Api.admin.delChildrenComment : Api.merchant.delChildrenComment;
|
||||
const {msg} = await api(id);
|
||||
Message.success(msg);
|
||||
emits('success');
|
||||
}
|
||||
|
||||
@@ -5,8 +5,12 @@ import Api from "../../api/index.ts";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
import Comment from "../Comment/index.vue";
|
||||
import Talk from "../Talk/index.vue";
|
||||
import AddMaterial from "../../pages/merchant/components/AddMaterial.vue";
|
||||
import AddComment from "../../pages/merchant/components/AddComment.vue";
|
||||
import RejectTaskModal from "../../pages/manage/pages/manage-reward-mission/components/RejectTaskModal.vue";
|
||||
|
||||
const emits = defineEmits(['success']);
|
||||
const selecdKey = ref([]);
|
||||
const {id} = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
@@ -17,22 +21,65 @@ const visible = ref(false);
|
||||
const detail = reactive({});
|
||||
const activeKey = ref(0);
|
||||
|
||||
const getData = async (update) => {
|
||||
Api.admin.getTaskChildrenInfo(id).then(({data}) => {
|
||||
if (update) {
|
||||
detail.content.forEach((v, index) => {
|
||||
v.comment = data.content[index].comment;
|
||||
});
|
||||
} else {
|
||||
Object.assign(detail, data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => visible.value,
|
||||
(val) => {
|
||||
if (val) Api.admin.getTaskChildrenInfo(id).then(({data}) => {
|
||||
Object.assign(detail, data);
|
||||
console.log('我看看我看看', data);
|
||||
});
|
||||
if (val) getData();
|
||||
},
|
||||
{deep: true}
|
||||
)
|
||||
|
||||
const passTaskChildren = async () => {
|
||||
const {code, msg} = await Api.admin.passTaskChildren(id);
|
||||
if (code === 1) Message.success(msg);
|
||||
visible.value = false;
|
||||
emits('success');
|
||||
console.log(selecdKey.value);
|
||||
|
||||
const pro_list = [];
|
||||
if (selecdKey.value.length === 0) {
|
||||
pro_list.push(new Promise((reactive, reject) => {
|
||||
Api.admin.passChildrenMaterial(detail.content[activeKey.value]).then((res) => {
|
||||
reactive(res);
|
||||
}).catch((err) => {
|
||||
reject(err);
|
||||
})
|
||||
}));
|
||||
}
|
||||
selecdKey.value.forEach(v => {
|
||||
pro_list.push(new Promise((reactive, reject) => {
|
||||
Api.admin.passChildrenMaterial(v).then((res) => {
|
||||
reactive(res);
|
||||
}).catch((err) => {
|
||||
reject(err);
|
||||
})
|
||||
}));
|
||||
})
|
||||
|
||||
const res = await Promise.all(pro_list);
|
||||
|
||||
let flag = true;
|
||||
|
||||
for (const v of res) {
|
||||
if (v.code !== 1) {
|
||||
Message.warning(v.msg)
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
Message.success(res[0].msg);
|
||||
visible.value = false;
|
||||
emits('success');
|
||||
}
|
||||
}
|
||||
|
||||
const refuseTaskChildren = async () => {
|
||||
@@ -57,41 +104,66 @@ const refuseTaskChildren = async () => {
|
||||
<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 v-model:model-value="item.title" :disabled="detail.check_status !== 0"></a-input>
|
||||
<a-form-item label="标题" v-if="item?.material_type?.title_limit > 0">
|
||||
<a-input v-model:model-value="item.title" :disabled="detail.check_status !== 0"
|
||||
:max-length="item.material_type.title_limit"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="正文">
|
||||
<a-form-item label="正文" v-if="item?.material_type?.desc_limit > 0">
|
||||
<a-textarea
|
||||
auto-size
|
||||
:max-length="1000"
|
||||
v-model:model-value="item.content"
|
||||
:max-length="item.material_type.desc_limit"
|
||||
show-word-limit
|
||||
:disabled="detail.check_status !== 0"
|
||||
:model-value="item.content">
|
||||
</a-textarea>
|
||||
</a-form-item>
|
||||
<a-form-item label="话题">
|
||||
<Talk v-model:model-value="item.tags_arr" :disabled="detail.check_status !== 0"></Talk>
|
||||
<a-form-item label="话题" v-if="item?.material_type?.tags_limit > 0">
|
||||
<Talk v-model:model-value="item.tags" :disabled="detail.check_status !== 0"
|
||||
:limit="item?.material_type?.tags_limit"></Talk>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="素材">
|
||||
<div v-if="item.materia_arr.length > 0" class="flex flex-wrap gap-[16px]">
|
||||
<div class="flex flex-wrap gap-[16px]">
|
||||
<x-image
|
||||
v-for="(v, index) in item.materia_arr"
|
||||
v-for="(v, index) in item.material"
|
||||
@delete="item.material.splice(index, 1)"
|
||||
:hide-delete="detail.check_status !== 0"
|
||||
:key="index"
|
||||
width="60px"
|
||||
height="60px"
|
||||
:src="v">
|
||||
</x-image>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无素材
|
||||
<add-material
|
||||
v-if="detail.check_status === 0"
|
||||
@success="val => item.material = val"
|
||||
ref="AddMaterialRef"
|
||||
:id="item.task_id"
|
||||
:material="item">
|
||||
<div
|
||||
class="size-[60px] bg-[#F2F3F5] flex justify-center items-center flex-col rounded-[8px] cursor-pointer">
|
||||
<icon-plus/>
|
||||
<div>添加</div>
|
||||
</div>
|
||||
</add-material>
|
||||
</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="评论区内容">
|
||||
<div v-if="item?.comment?.length > 0" class="flex flex-col gap-[8px] w-full">
|
||||
<comment :data="item.comment" :hide-delete="true"></comment>
|
||||
<div class="flex-grow">
|
||||
<div v-if="item.comment.length > 0" class="flex flex-col gap-[8px] w-full mb-[12px]">
|
||||
<comment :data="item.comment" :hide-delete="detail.check_status !== 0"
|
||||
@success="getData(true)"></comment>
|
||||
</div>
|
||||
<add-comment
|
||||
v-if="detail.check_status === 0"
|
||||
@success="getData(true)"
|
||||
:material="{id: id}"
|
||||
:item="item">
|
||||
<a-button>
|
||||
<icon-plus/>
|
||||
<div>添加评论</div>
|
||||
</a-button>
|
||||
</add-comment>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
@@ -100,16 +172,25 @@ const refuseTaskChildren = async () => {
|
||||
|
||||
<template #footer>
|
||||
<div class="flex items-center gap-[8px]">
|
||||
<!-- <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-checkbox-group>-->
|
||||
<a-checkbox-group v-model:model-value="selecdKey">
|
||||
<template v-for="(item, index) in detail.content" :key="item">
|
||||
<a-checkbox v-show="activeKey === index" :value="item">选中
|
||||
</a-checkbox>
|
||||
</template>
|
||||
</a-checkbox-group>
|
||||
|
||||
<template v-if="detail.check_status === 0">
|
||||
<a-button @click="passTaskChildren" type="primary" class="ml-auto">通过
|
||||
</a-button>
|
||||
<a-button @click="refuseTaskChildren">拒绝</a-button>
|
||||
<RejectTaskModal
|
||||
:api="Api.admin.refuseTaskChildren"
|
||||
:id="detail.id"
|
||||
@success="() => {
|
||||
visible = false;
|
||||
emits('success')
|
||||
}">
|
||||
<a-button>拒绝</a-button>
|
||||
</RejectTaskModal>
|
||||
</template>
|
||||
<a-button v-else @click="visible=false" class="ml-auto">关闭</a-button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user