|
|
@@ -9,6 +9,7 @@ const AIRobotHoverVisible = ref(false)
|
|
|
const clicked = ref(false)
|
|
|
const isShowDefault = ref(false)
|
|
|
const isShowAIRobotTop = ref(false)
|
|
|
+const AIIconVisible = ref(false)
|
|
|
const DeQuestions = ref([
|
|
|
{
|
|
|
label: 'List shipments with ETA changes in the last 30 days.',
|
|
|
@@ -72,7 +73,7 @@ const AvatarMouseLeave = () => {
|
|
|
AIRobotHoverVisible.value = false
|
|
|
}
|
|
|
}
|
|
|
-const emit = defineEmits(['AvatarClick'])
|
|
|
+const emit = defineEmits(['AvatarClick', 'handelClickAIDefault'])
|
|
|
// 点击AIRobot图标
|
|
|
const AvatarClick = () => {
|
|
|
clicked.value = true
|
|
|
@@ -117,13 +118,31 @@ const prepareGroups = () => {
|
|
|
|
|
|
itemGroups.value = groups;
|
|
|
}
|
|
|
-
|
|
|
const isShowLogin = () => {
|
|
|
+ const LoginDays = 0
|
|
|
+ let settimeouttime = 0
|
|
|
+ AIIconVisible.value = true
|
|
|
isShowDefault.value = true
|
|
|
+ if(LoginDays == 0) {
|
|
|
+ settimeouttime = 45000
|
|
|
+ } else if (LoginDays == 2) {
|
|
|
+ settimeouttime = 15000
|
|
|
+ } else {
|
|
|
+ settimeouttime = 10000
|
|
|
+ }
|
|
|
setTimeout(() => {
|
|
|
isShowDefault.value = false
|
|
|
isShowAIRobotTop.value = true
|
|
|
- }, 5000);
|
|
|
+ }, settimeouttime);
|
|
|
+}
|
|
|
+
|
|
|
+// 点击问题
|
|
|
+const handelClick = (item: any) => {
|
|
|
+ emit('handelClickAIDefault',item)
|
|
|
+ clicked.value = true
|
|
|
+ AIRobotHoverVisible.value = false
|
|
|
+ isShowDefault.value = false
|
|
|
+ isShowAIRobotTop.value = false
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
@@ -144,7 +163,7 @@ defineExpose({
|
|
|
<div class="AIRobot-top" v-if="isShowDefault">
|
|
|
<div class="flex_end" @click="HideAIRobotTop">
|
|
|
<div class="icon flex_center">
|
|
|
- <span class="iconfont_icon icon_dark">
|
|
|
+ <span class="iconfont_icon icon_dark AI_icon">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use xlink:href="#icon-icon_reject_b"></use>
|
|
|
</svg>
|
|
|
@@ -177,6 +196,7 @@ defineExpose({
|
|
|
class="dialogue_content_item"
|
|
|
v-for="item in group"
|
|
|
:key="item.label"
|
|
|
+ @click="handelClick(item.label)"
|
|
|
:class="{ 'long_item': item.isLong }"
|
|
|
>
|
|
|
{{ item.label }}
|
|
|
@@ -190,7 +210,7 @@ defineExpose({
|
|
|
<div class="AIRobot-top" v-if="isShowAIRobotTop">
|
|
|
<div class="flex_end" @click="HideAIRobotTopTwo">
|
|
|
<div class="icon flex_center">
|
|
|
- <span class="iconfont_icon icon_dark">
|
|
|
+ <span class="iconfont_icon icon_dark AI_icon">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use xlink:href="#icon-icon_reject_b"></use>
|
|
|
</svg>
|
|
|
@@ -202,7 +222,7 @@ defineExpose({
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 悬浮icon -->
|
|
|
- <div class="AIRobot flex_center">
|
|
|
+ <div class="AIRobot flex_center" v-if="AIIconVisible">
|
|
|
<el-popover
|
|
|
:visible="visible"
|
|
|
placement="top-end"
|
|
|
@@ -218,7 +238,7 @@ defineExpose({
|
|
|
</template>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-.iconfont_icon {
|
|
|
+.AI_icon {
|
|
|
margin-right: 0;
|
|
|
}
|
|
|
.flex_center {
|
|
|
@@ -328,6 +348,11 @@ defineExpose({
|
|
|
word-break: break-word;
|
|
|
overflow: hidden;
|
|
|
transition: all 0.3s ease;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.dialogue_content_item:hover {
|
|
|
+ background-color: var(--color-arrow-hoverL);
|
|
|
+ color: var(--color-theme);
|
|
|
}
|
|
|
.itemLable {
|
|
|
width: 100%;
|