原料库和成品库

This commit is contained in:
lq
2025-09-20 17:17:55 +08:00
parent c03142b85f
commit 1693cd477b

View File

@ -129,172 +129,177 @@
</div> </div>
</div> </div>
</div> </div>
<a-drawer <div v-show="isActive == 'ai'">
title="原料库" <a-drawer
cancel-text="取消" title="原料库"
ok-text="确定" cancel-text="取消"
placement="right" ok-text="确定"
v-model:visible="showDrawer2" placement="right"
@after-visible-change="showDriwerChange" v-model:visible="showDrawer2"
width="904px" @after-visible-change="showDriwerChange"
class="task-drawer" width="904px"
style="right: 481px" class="task-drawer"
> style="right: 481px"
<Table
:data-source="materialData"
bordered
:columns="columns"
:pagination="false"
row-key="id"
:row-selection="rowSelection"
> >
<template #name="{ record }"> <Table
<div class="flex items-center"> :data-source="materialData"
<img :src="record.cover" class="w-64px h-64px border-rounded-8px bg-#F0EDFF" /> bordered
<div class="flex flex-col ml-8px"> :columns="columns"
<div>{{ record.name }}</div> :pagination="false"
<div class="text-#999 text-12px">序号{{ record.uid }}</div> row-key="id"
:row-selection="rowSelection"
>
<template #name="{ record }">
<div class="flex items-center">
<img :src="record.cover" class="w-64px h-64px border-rounded-8px bg-#F0EDFF" />
<div class="flex flex-col ml-8px">
<div>{{ record.name }}</div>
<div class="text-#999 text-12px">序号{{ record.uid }}</div>
</div>
</div> </div>
</div> </template>
</template> <template #type="{ record }">
<template #type="{ record }"> <div class="flex items-center">
<div class="flex items-center"> {{ getType(record.type) }}
{{ getType(record.type) }}
</div>
</template>
<template #from="{ record }">
<div class="flex items-center">
{{ getFrom(record.type) }}
</div>
</template>
<template #create_at="{ record }">
<div class="flex items-center">
{{ record.created_at ? dayjs(record.created_at * 1000).format('YYYY-MM-DD HH:mm:ss') : '-' }}
</div>
</template>
</Table>
<!-- 分页控件 -->
<div v-if="pageInfo.total > 0" class="pagination-box">
<a-pagination
:total="pageInfo.total"
size="mini"
show-total
show-jumper
show-page-size
:current="pageInfo.page"
:page-size="pageInfo.page_size"
@change="onPageChange"
@page-size-change="onPageSizeChange"
/>
</div>
<template #footer>
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="color-#737478 font-size-14px">已选择</div>
<div class="color-#737478 font-size-14px">{{ choseText }}</div>
<div v-for="item in choseImgArray" :key="item.id" class="ml-16px">
<img :src="item.cover" alt="" class="w-44px h-44px border-rounded-8px bg-#F0EDFF" />
</div> </div>
</div> </template>
<div class="flex justify-end"> <template #from="{ record }">
<Button @click="handleCancel">取消</Button> <div class="flex items-center">
<Button class="ml-16px" type="primary" @click="handleOk">确定</Button> {{ getFrom(record.type) }}
</div> </div>
</template>
<template #create_at="{ record }">
<div class="flex items-center">
{{ record.created_at ? dayjs(record.created_at * 1000).format('YYYY-MM-DD HH:mm:ss') : '-' }}
</div>
</template>
</Table>
<!-- 分页控件 -->
<div v-if="pageInfo.total > 0" class="pagination-box">
<a-pagination
:total="pageInfo.total"
size="mini"
show-total
show-jumper
show-page-size
:current="pageInfo.page"
:page-size="pageInfo.page_size"
@change="onPageChange"
@page-size-change="onPageSizeChange"
/>
</div> </div>
</template> <template #footer>
</a-drawer> <div class="flex items-center justify-between">
<a-drawer <div class="flex items-center">
title="成品库" <div class="color-#737478 font-size-14px">已选择</div>
cancel-text="取消" <div class="color-#737478 font-size-14px">{{ choseText }}</div>
ok-text="确定" <div v-for="item in choseImgArray" :key="item.id" class="ml-16px">
placement="right" <img :src="item.cover" alt="" class="w-44px h-44px border-rounded-8px bg-#F0EDFF" />
v-model:visible="showDrawer3" </div>
@after-visible-change="showDriwerChange" </div>
width="904px" <div class="flex justify-end">
class="task-drawer" <Button @click="handleCancel">取消</Button>
style="right: 481px" <Button class="ml-16px" type="primary" @click="handleOk">确定</Button>
> </div>
<Table </div>
:data-source="materialData" </template>
bordered </a-drawer>
:columns="columns2" </div>
:pagination="false" <div v-show="isActive == 'chose'">
row-key="id" <a-drawer
:row-selection="rowSelection" title="成品库"
cancel-text="取消"
ok-text="确定"
placement="right"
v-model:visible="showDrawer3"
@after-visible-change="showDriwerChange"
width="904px"
class="task-drawer"
style="right: 481px"
> >
<template #cover="{ record }"> <Table
<div class="flex items-center"> :data-source="materialData"
<img bordered
:src="record.cover ? record.cover : icon4" :columns="columns2"
alt="" :pagination="false"
class="w-44px h-44px border-rounded-8px bg-#F0EDFF" row-key="id"
/> :row-selection="rowSelection"
</div> >
</template> <template #cover="{ record }">
<template #name="{ record }"> <div class="flex items-center">
<div class="flex items-center"> <img
<div>{{ record.title }}</div> :src="record.cover ? record.cover : icon4"
</div> alt=""
</template> class="w-44px h-44px border-rounded-8px bg-#F0EDFF"
<template #type="{ record }"> />
<div class="flex items-center"> </div>
<img </template>
:src="record.type === EnumManuscriptType.Image ? icon2 : icon3" <template #name="{ record }">
width="16" <div class="flex items-center">
height="16" <div>{{ record.title }}</div>
class="mr-4px" </div>
/> </template>
<span class="cts" :class="record.type === EnumManuscriptType.Image ? '!color-#25C883' : '!color-#6D4CFE'">{{ <template #type="{ record }">
record.type === EnumManuscriptType.Image ? '图文' : '视频' <div class="flex items-center">
}}</span> <img
</div> :src="record.type === EnumManuscriptType.Image ? icon2 : icon3"
</template> width="16"
<template #uploader="{ record }"> height="16"
<div class="flex items-center"> class="mr-4px"
{{ record.last_modifier.mobile }} />
</div> <span
</template> class="cts"
<template #audit_status="{ record }"> :class="record.type === EnumManuscriptType.Image ? '!color-#25C883' : '!color-#6D4CFE'"
<div class="flex items-center"> >{{ record.type === EnumManuscriptType.Image ? '图文' : '视频' }}</span
{{ getStatus(record.audit_status) }} >
</div> </div>
</template> </template>
<template #last_modified_at="{ record }"> <template #uploader="{ record }">
<div class="flex items-center"> <div class="flex items-center">
{{ record.created_at ? dayjs(record.last_modified_at * 1000).format('YYYY-MM-DD HH:mm:ss') : '-' }} {{ record.last_modifier.mobile }}
</div> </div>
</template> </template>
</Table> <template #audit_status="{ record }">
<!-- 分页控件 --> <div class="flex items-center">
<div v-if="pageInfo.total > 0" class="pagination-box"> {{ getStatus(record.audit_status) }}
<a-pagination </div>
:total="pageInfo.total" </template>
size="mini" <template #last_modified_at="{ record }">
show-total <div class="flex items-center">
show-jumper {{ record.created_at ? dayjs(record.last_modified_at * 1000).format('YYYY-MM-DD HH:mm:ss') : '-' }}
show-page-size </div>
:current="pageInfo.page" </template>
:page-size="pageInfo.page_size" </Table>
@change="onPageChange" <div v-if="pageInfo.total > 0" class="pagination-box">
@page-size-change="onPageSizeChange" <a-pagination
/> :total="pageInfo.total"
</div> size="mini"
<template #footer> show-total
<div class="flex items-center justify-between"> show-jumper
<div class="flex items-center"> show-page-size
<div class="color-#737478 font-size-14px">已选择</div> :current="pageInfo.page"
<div class="color-#737478 font-size-14px">{{ choseText }}</div> :page-size="pageInfo.page_size"
<div v-for="item in choseImgArray" :key="item.id" class="ml-16px"> @change="onPageChange"
<img :src="item.cover ? item.cover : icon4" class="w-44px h-44px border-rounded-8px bg-#F0EDFF" /> @page-size-change="onPageSizeChange"
/>
</div>
<template #footer>
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="color-#737478 font-size-14px">已选择</div>
<div class="color-#737478 font-size-14px">{{ choseText }}</div>
<div v-for="item in choseImgArray" :key="item.id" class="ml-16px">
<img :src="item.cover ? item.cover : icon4" class="w-44px h-44px border-rounded-8px bg-#F0EDFF" />
</div>
</div>
<div class="flex justify-end">
<Button @click="handleCancel">取消</Button>
<Button class="ml-16px" type="primary" @click="handleOk">确定</Button>
</div> </div>
</div> </div>
<div class="flex justify-end"> </template>
<Button @click="handleCancel">取消</Button> </a-drawer>
<Button class="ml-16px" type="primary" @click="handleOk">确定</Button> </div>
</div>
</div>
</template>
</a-drawer>
</a-drawer> </a-drawer>
</template> </template>
@ -546,10 +551,6 @@ watch(showDriwer, (newVal) => {
} }
}); });
const handleTabSelect = (value) => {
isActive.value = value;
};
const handleDateChange = (date) => {}; const handleDateChange = (date) => {};
// 暴露方法给父组件 // 暴露方法给父组件
const showDrawer = (accountInfo = null) => { const showDrawer = (accountInfo = null) => {