This commit is contained in:
2025-05-10 15:59:02 +08:00
parent d6b32af2b2
commit 396fd4b934
21 changed files with 662 additions and 83 deletions

View File

@@ -1,7 +1,9 @@
<script setup>
import XImage from "../../components/XImage/Index.vue";
import {reactive, ref, watch} from 'vue';
import Api from "../../api/index.ts";
import {Message} from "@arco-design/web-vue";
import Comment from "../Comment/index.vue";
const emits = defineEmits(['success']);
const {id} = defineProps({
@@ -12,7 +14,7 @@ const {id} = defineProps({
});
const visible = ref(false);
const detail = reactive({});
const activeKey = ref(1);
const activeKey = ref(0);
watch(
() => visible.value,
@@ -28,12 +30,14 @@ watch(
const passTaskChildren = async () => {
const {code, msg} = await Api.admin.passTaskChildren(id);
if (code === 1) Message.success(msg);
visible.value = false;
emits('success');
}
const refuseTaskChildren = async () => {
const {code, msg} = await Api.admin.refuseTaskChildren(id);
if (code === 1) Message.success(msg);
visible.value = false;
emits('success');
}
</script>
@@ -64,41 +68,37 @@ const refuseTaskChildren = async () => {
</a-textarea>
</a-form-item>
<a-form-item label="话题">
<div id="tag-list" class="w-full bg-[var(--color-neutral-2)] p-[4px]">
<div v-if="item.tags_arr.length > 0" id="tag-list"
class="w-full bg-[var(--color-neutral-2)] p-[4px]">
<a-tag v-for="v in item.tags_arr">#{{ v }}</a-tag>
</div>
<div v-else>
暂无话题
</div>
</a-form-item>
<a-form-item label="素材">
<div class="flex flex-wrap gap-[16px]">
<a-image
v-for="v in item.materia_arr"
<div v-if="item.materia_arr.length > 0" class="flex flex-wrap gap-[16px]">
<x-image
v-for="(v, index) in item.materia_arr"
:hide-delete="true"
:key="index"
width="60px"
height="60px"
:src="v">
</a-image>
</x-image>
</div>
<div v-else>
暂无话题
</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" 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="v.image">
</a-image>
第三个很好用大家可以在网上搜同款
</div>
</div>
<div v-if="item.comment.length > 0" class="flex flex-col gap-[8px] w-full">
<comment :data="item.comment" :hide-delete="true"></comment>
</div>
<div v-else>
暂无评论区内容
</div>
</a-form-item>
</a-form>
@@ -107,14 +107,18 @@ 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>-->
<!-- <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-button @click="passTaskChildren" type="primary" class="ml-auto">通过</a-button>
<a-button @click="refuseTaskChildren">拒绝</a-button>
<template v-if="detail.check_status === 0">
<a-button @click="passTaskChildren" type="primary" class="ml-auto">通过
</a-button>
<a-button @click="refuseTaskChildren">拒绝</a-button>
</template>
<a-button v-else @click="visible=false" class="ml-auto">关闭</a-button>
</div>
</template>
</a-modal>