2026-09-01 16:05:29 +03:30
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import { RouterLink } from 'vue-router';
|
|
|
|
|
|
import UiIcon from '@/components/UiIcon.vue';
|
|
|
|
|
|
|
|
|
|
|
|
defineProps<{
|
|
|
|
|
|
askQuery: string;
|
|
|
|
|
|
}>();
|
|
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
|
|
|
'update:askQuery': [value: string];
|
|
|
|
|
|
ask: [];
|
|
|
|
|
|
}>();
|
|
|
|
|
|
|
|
|
|
|
|
const shortcuts = [
|
2026-09-02 16:06:17 +03:30
|
|
|
|
{ label: 'خلاصه مشتری شرکت آریا را بده', to: '/contacts', icon: 'users' as const },
|
2026-09-01 16:05:29 +03:30
|
|
|
|
{ label: 'متن پیگیری برای مشتری بفرست', to: '/notes', icon: 'send' as const },
|
|
|
|
|
|
{ label: 'گزارش فروش این هفته را نشان بده', to: '/reports', icon: 'chart' as const },
|
|
|
|
|
|
{ label: 'معاملات در خطر را لیست کن', to: '/pipeline', icon: 'warning' as const },
|
|
|
|
|
|
];
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2026-09-02 16:06:17 +03:30
|
|
|
|
<article class="panel">
|
2026-09-01 16:05:29 +03:30
|
|
|
|
<header class="panel-head">
|
|
|
|
|
|
<h2>
|
2026-09-02 16:06:17 +03:30
|
|
|
|
<span class="spark"><UiIcon name="sparkle" :size="15" /></span>
|
2026-09-01 16:05:29 +03:30
|
|
|
|
دستیار هوشمند منتو
|
|
|
|
|
|
</h2>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="ai-lead">چه کمکی میتونم بکنم؟</p>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ai-shortcuts">
|
2026-09-02 16:06:17 +03:30
|
|
|
|
<RouterLink v-for="item in shortcuts" :key="item.label" class="ai-chip" :to="item.to">
|
|
|
|
|
|
<span class="chip-ico"><UiIcon :name="item.icon" :size="14" /></span>
|
2026-09-01 16:05:29 +03:30
|
|
|
|
<span>{{ item.label }}</span>
|
|
|
|
|
|
</RouterLink>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<form class="ai-input" @submit.prevent="emit('ask')">
|
|
|
|
|
|
<input
|
|
|
|
|
|
:value="askQuery"
|
|
|
|
|
|
type="search"
|
|
|
|
|
|
placeholder="از منتو بپرس..."
|
|
|
|
|
|
@input="emit('update:askQuery', ($event.target as HTMLInputElement).value)"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<button type="submit" aria-label="ارسال">
|
2026-09-02 16:06:17 +03:30
|
|
|
|
<UiIcon name="send" :size="15" />
|
2026-09-01 16:05:29 +03:30
|
|
|
|
</button>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
</article>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.panel {
|
|
|
|
|
|
background: #fff;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
border-radius: 20px;
|
|
|
|
|
|
padding: 1rem 1rem 0.95rem;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
|
|
|
|
|
border: 1px solid #eef2f7;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.panel-head {
|
|
|
|
|
|
margin-bottom: 0.55rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
|
|
margin: 0;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
font-size: 0.92rem;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
align-items: center;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
gap: 0.4rem;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
color: #0f172a;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-02 16:06:17 +03:30
|
|
|
|
.spark {
|
|
|
|
|
|
color: #eab308;
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 16:05:29 +03:30
|
|
|
|
.ai-lead {
|
2026-09-02 16:06:17 +03:30
|
|
|
|
margin: 0 0 0.75rem;
|
|
|
|
|
|
padding: 0.55rem 0.75rem;
|
|
|
|
|
|
width: fit-content;
|
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
background: #d1fae5;
|
|
|
|
|
|
color: #115e59;
|
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
border-radius: 14px 14px 4px 14px;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-shortcuts {
|
|
|
|
|
|
display: grid;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
gap: 0.4rem;
|
|
|
|
|
|
margin-bottom: 0.8rem;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-chip {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
gap: 0.55rem;
|
|
|
|
|
|
padding: 0.58rem 0.7rem;
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
background: #fff;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
border: 1px solid #eef2f7;
|
|
|
|
|
|
color: #334155;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
font-size: 0.76rem;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
text-decoration: none;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
|
2026-09-01 16:05:29 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-chip:hover {
|
2026-09-02 16:06:17 +03:30
|
|
|
|
background: #f0fdfa;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
border-color: #99f6e4;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.chip-ico {
|
2026-09-02 16:06:17 +03:30
|
|
|
|
width: 26px;
|
|
|
|
|
|
height: 26px;
|
|
|
|
|
|
border-radius: 8px;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
background: #ecfdf8;
|
|
|
|
|
|
color: #14b8a6;
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
place-items: center;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-input {
|
|
|
|
|
|
display: flex;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
gap: 0.4rem;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
margin-top: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-input input {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
border: 1px solid #e2e8f0;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
padding: 0.58rem 0.75rem;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
background: #f8fafc;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
font-size: 0.8rem;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-input button {
|
2026-09-02 16:06:17 +03:30
|
|
|
|
width: 40px;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
border: 0;
|
2026-09-02 16:06:17 +03:30
|
|
|
|
border-radius: 12px;
|
2026-09-01 16:05:29 +03:30
|
|
|
|
background: #14b8a6;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
place-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|