<template>
|
<a-drawer
|
v-model:open="drawerOpen"
|
:placement="placement"
|
width="1200"
|
:body-style="{ paddingBottom: '80px' }"
|
:footer-style="{ textAlign: 'right' }"
|
@after-open-change="afterOpenChange"
|
@close="close"
|
>
|
<template #title>
|
<pageHeadLeft :checked="true"></pageHeadLeft>
|
</template>
|
<template #extra>
|
<div style="font-size: 16px">
|
共<span class="m-1">222</span>封 <LeftOutlined style="padding: 0 20px" /><RightOutlined />
|
</div>
|
</template>
|
|
<div class="flex-between">
|
<div class="ct-left p-2" :class="isOpen ? 'isOpen' : 'onOpen'">
|
<div class="title" style="margin-bottom: 20px;">
|
<div class="left">
|
<span style="margin-right: 20px; font-size: 24px; font-weight: 700">标题</span>
|
<span style="margin-right: 10px; font-size: 16px"><PushpinOutlined /></span>
|
</div>
|
<div class="right">
|
<div class="tate"> 2024-06-08 15:03:09 </div>
|
<div>
|
<a-dropdown-button>
|
<span><LeftOutlined /></span>
|
<a-divider type="vertical" />
|
<span><DoubleLeftOutlined /></span>
|
<template #overlay>
|
<a-menu>
|
<a-menu-item key="1">
|
<UserOutlined />
|
1st menu item
|
</a-menu-item>
|
<a-menu-item key="2">
|
<UserOutlined />
|
2nd menu item
|
</a-menu-item>
|
<a-menu-item key="3">
|
<UserOutlined />
|
3rd item
|
</a-menu-item>
|
</a-menu>
|
</template>
|
</a-dropdown-button>
|
</div>
|
</div>
|
</div>
|
<div class="user p-1">
|
<div style="display: flex;align-items: center;">
|
<a-avatar size="small" style="margin-right: 8px" src="#" /> xxx <span>{{`<dddddddddd@qq.com>`}}</span>
|
<span style="margin: 0 10px;">发送</span>
|
<a-popover placement="bottom">
|
<template #content>
|
<div
|
class="p-2"
|
style="
|
display: flex;
|
align-items: center;
|
border-bottom: 1px solid rgb(5 5 5 / 6%);
|
"
|
>
|
<a-avatar size="small" style="margin-right: 8px" src="#" />
|
<span style="color: #000; font-weight: 700">ssss</span>
|
<CopyOutlined />
|
</div>
|
<div class="display-flex p-2">
|
<a-button type="link" size="small">往来邮件</a-button></div
|
>
|
</template>
|
<a-avatar size="small" style="margin-right: 8px" src="#" /> xxx <span>{{`<dddddddddd@qq.com>`}}</span>
|
</a-popover>
|
</div>
|
<div type="info" class="p-2" style="margin-top: 10px;background-color: #e4f1ff;font-size: 14px;">
|
<span>{{`<dddddddddd@qq.com>`}}</span><span>暂未查询到该客户的当地时间</span><span>2024-06-08 22:22</span>
|
</div>
|
<div class="ct">
|
<Tinymce></Tinymce>
|
</div>
|
<a-input size="large" v-model:value="userName" placeholder="快速回复">
|
<template #prefix>
|
<LeftOutlined style="color: #999;"/>
|
</template>
|
</a-input>
|
</div>
|
</div>
|
<div v-show="isOpen" class="ct-right p-2">
|
sssss
|
</div>
|
</div>
|
|
|
<div @click="fuToggleContent" class="toggle-btn" :class="isOpen ? 'onIconOpen' : 'iconOpen'">
|
<LeftOutlined v-if="!isOpen" />
|
<RightOutlined v-else />
|
</div>
|
</a-drawer>
|
</template>
|
|
<script lang="ts" setup>;
|
name: 'drawerDetail';
|
import { ref, watch, defineProps, defineEmits, computed, reactive } from 'vue';
|
import {
|
LeftOutlined,
|
RightOutlined,
|
DoubleLeftOutlined,
|
PushpinOutlined,
|
CopyOutlined,
|
UserOutlined
|
} from '@ant-design/icons-vue';
|
import pageHeadLeft from '../pageHeadLeft.vue';
|
import Tinymce from '@/components/Tinymce/src/index.vue';
|
|
// 定义属性
|
interface Props {
|
modelValue: boolean;
|
title?: string;
|
placement?: 'left' | 'right' | 'top' | 'bottom';
|
idName?: string;
|
selectIds?: number[];
|
}
|
const props = defineProps<Props>();
|
|
// 定义事件
|
const emit = defineEmits(['update:modelValue', 'updateData']);
|
|
// 内部状态
|
const drawerOpen = ref(props.modelValue);
|
|
// 监听属性变化
|
watch(
|
() => props.modelValue,
|
(newValue) => {
|
drawerOpen.value = newValue;
|
if (props.selectIds && props.selectIds.length > 0) {
|
} else {
|
}
|
},
|
);
|
|
// 更新外部属性
|
watch(drawerOpen, (newValue) => {
|
emit('update:modelValue', newValue);
|
});
|
import { getUserListApi } from '@/api/email/userList';
|
|
// 方法
|
|
import { useCollapseStore } from '@/store/modules/useCollapseStore';
|
const collapseStore = useCollapseStore();
|
const afterOpenChange = (bool: boolean) => {
|
if (bool) {
|
fnGetUserList({ page: 1, pageSize: 30 });
|
}
|
|
collapseStore.toggle(false);
|
|
|
};
|
const close = (e) => {
|
drawerOpen.value = false;
|
};
|
const fnGetUserList = (params) => {
|
// getUserListApi(params).then((res) => {
|
// if (res && res.items && Array.isArray(res.items)) {
|
// dataSource.value = res.items;
|
// selectContactNum.value = res.total;
|
// } else {
|
// console.error('Invalid response format:', res);
|
// }
|
// });
|
}
|
// 计算属性
|
const title = computed(() => props.title || 'Basic Drawer');
|
const placement = computed(() => props.placement || 'right');
|
const idName = computed(() => props.idName || 'recipients');
|
|
// // 显示抽屉的方法
|
// const showDrawer = () => {
|
// drawerOpen.value = true;
|
// };
|
|
const fnSaveOpenChange = () => {
|
// console.log('selectedRowKeys changed: ', state.selectedRowKeys);
|
// drawerOpen.value = false;
|
// emit('update:modelValue', false);
|
// const data = {
|
// selectedRowKeys: state.selectedRowKeys,
|
//; idName: idName.value,
|
// };
|
// emit('updateData', data);
|
};
|
|
const userName = ref('');
|
const isOpen = ref(false)
|
function fuToggleContent (){
|
isOpen.value = !isOpen.value
|
}
|
</script>
|
|
<style scoped lang="less">
|
/* 样式可以在这里定义 */
|
|
.table-content {
|
display: flex;
|
justify-content: space-between;
|
border-top: 1px solid #f0f0f0;
|
|
.left {
|
width: 50%;
|
height: 100%;
|
border-right: 1px solid #f0f0f0;
|
}
|
|
.right {
|
width: 50%;
|
height: 100%;
|
}
|
}
|
|
::v-deep(.ant-table) {
|
min-height: 355px !important;
|
}
|
|
.title {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
|
& .left {
|
display: flex;
|
align-items: center;
|
width: 50%;
|
}
|
|
& .right {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
width: 25%;
|
|
& .tate {
|
color: #999;
|
font-size: 14px;
|
}
|
}
|
}
|
|
.ct{
|
// height: 66vh;height
|
margin: 20px 0;
|
}
|
|
.flex-between{
|
display: flex;
|
}
|
|
.ct-left{
|
padding-right: 20px;
|
// border-right: 1px solid #f0f0f0;
|
}
|
|
.ct-right{
|
border-left: 1px solid #f0f0f0;
|
|
}
|
|
.toggle-btn {
|
display: flex;
|
position: absolute;
|
z-index: 99;
|
top: 50%;
|
width: 20px; /* 原始宽度 */
|
height: 54px;
|
padding-left: 5px;
|
transform: translateY(-50%);
|
border: 1px solid #f0f0f0;
|
border-right: none;
|
border-radius: 10px 0 0 10px;
|
background: #fafafa;
|
|
}
|
|
.onOpen {
|
width: 100%;
|
}
|
|
.isOpen {
|
width: 69%;
|
}
|
|
.iconOpen {
|
right: 0%;
|
|
}
|
|
.onIconOpen {
|
right: 32%;
|
|
}
|
</style>
|