<template>
|
<BasicDrawer
|
class="clues-detail-drawer"
|
v-bind="$attrs"
|
title="线索详情"
|
@register="registerDrawer"
|
:maskClosable="false"
|
:keyboard="false"
|
width="550px"
|
>
|
<template #title>
|
<div class="text-right">
|
<span>
|
<Tooltip v-if="isFollow" title="已关注">
|
<Icon
|
icon="mingcute:heart-fill"
|
class="mr-15px cursor-pointer c-red-5"
|
@click="handleCancelFollow"
|
:size="20"
|
/>
|
</Tooltip>
|
<Tooltip v-else title="未关注">
|
<Icon
|
icon="mingcute:heart-line"
|
class="mr-15px cursor-pointer"
|
@click="handleFollow"
|
:size="20"
|
/>
|
</Tooltip>
|
</span>
|
<Icon
|
icon="ri:edit-line"
|
class="mr-15px cursor-pointer"
|
@click="handleEditCluesForm"
|
:size="20"
|
/>
|
<Icon
|
icon="mdi:email-outline"
|
class="mr-15px cursor-pointer"
|
@click=""
|
:size="20"
|
/>
|
<a-dropdown :trigger="['click']">
|
<Icon
|
icon="gg:add-r"
|
class="mr-15px cursor-pointer"
|
@click=""
|
:size="20"
|
/>
|
<template #overlay>
|
<a-menu>
|
<a-menu-item key="0" @click="handleNewSchedule">
|
<span >新建日程</span>
|
</a-menu-item>
|
<a-menu-item key="1" >
|
<span>转化为客户</span>
|
</a-menu-item>
|
<!-- <a-menu-divider />-->
|
<a-menu-item key="2">转化为已有客户</a-menu-item>
|
</a-menu>
|
</template>
|
</a-dropdown>
|
<a-dropdown :trigger="['click']">
|
<Icon
|
icon="ri:more-2-fill"
|
class="cursor-pointer"
|
@click=""
|
:size="20"
|
/>
|
<template #overlay>
|
<a-menu>
|
<a-menu-item key="0">
|
<span >转移</span>
|
</a-menu-item>
|
<a-menu-item key="1" @click="handleReallocate">
|
<span>重新分配</span>
|
</a-menu-item>
|
<!-- <a-menu-divider />-->
|
<a-menu-item key="2">合并线索</a-menu-item>
|
<a-menu-item key="3">无效</a-menu-item>
|
<a-popconfirm title="确定删除当前线索吗?" placement="top" @confirm="handleDeleteClues" ok-text="确定" cancel-text="取消">
|
<a-menu-item key="4">删除</a-menu-item>
|
</a-popconfirm>
|
|
</a-menu>
|
</template>
|
</a-dropdown>
|
</div>
|
|
</template>
|
<Content></Content>
|
<!-- <BasicForm @register="registerForm"></BasicForm>-->
|
</BasicDrawer>
|
</template>
|
<script lang="ts" setup>
|
// import { useForm } from '@/components/Form';
|
// import { formSchema } from './drawerData';
|
import {BasicDrawer, useDrawerInner} from '@/components/Drawer';
|
import Icon from "@/components/Icon/Icon.vue";
|
import {Tooltip} from "ant-design-vue";
|
import Content from "./drawer/index.vue";
|
import EventBus from "@/utils/eventBus";
|
import {reactive, defineEmits, ref} from 'vue';
|
|
const emit = defineEmits(['success', 'register']);
|
|
// const [registerForm, { setFieldsValue, }] = useForm({
|
// labelWidth: 90,
|
// baseColProps: { span: 24 },
|
// schemas: formSchema,
|
// showActionButtonGroup: false,
|
// });
|
|
// const [registerDrawer] = useDrawer();
|
let currentClues = reactive({});
|
const [registerDrawer] = useDrawerInner((data) => {
|
Logger.log('Drawer 注册回调', data);
|
currentClues = data.clue;
|
// // 方式1
|
// setFieldsValue({
|
// field2: data.data,
|
// field1: data.info,
|
// });
|
});
|
|
function handleEditCluesForm() {
|
Logger.log('点击了编辑表单', currentClues);
|
EventBus.emit('openCluesFormDrawer', currentClues);
|
}
|
function handleReallocate() {
|
Logger.log('点击了重新分配', currentClues);
|
EventBus.emit('openReallocateModal', currentClues);
|
}
|
function handleDeleteClues() {
|
Logger.log('点击了删除线索', currentClues);
|
}
|
|
function handleNewSchedule() {
|
Logger.log('点击了新建日程', currentClues);
|
EventBus.emit('openScheduleModal',{
|
title:'新建日程12',
|
});
|
}
|
|
const isFollow = ref(false);
|
function handleFollow() {
|
Logger.log('关注');
|
isFollow.value = true;
|
}
|
function handleCancelFollow() {
|
Logger.log('取消关注');
|
isFollow.value = false;
|
}
|
|
</script>
|