Merge branch 'master' of http://222.186.21.35:32012/jianguo/wx
This commit is contained in:
commit
ec4c9a3639
2
.env
2
.env
|
@ -1,2 +1,2 @@
|
||||||
VITE_APP_BASE_API=http://160.202.224.52:31002
|
VITE_APP_BASE_API=http://160.202.224.52:31002
|
||||||
VITE_APP_ENV=default
|
VITE_APP_ENV=default
|
|
@ -1,2 +1,2 @@
|
||||||
VITE_APP_BASE_API=http://api.production.com
|
VITE_APP_BASE_API=http://160.202.224.52:31002
|
||||||
VITE_APP_ENV=production
|
VITE_APP_ENV=production
|
|
@ -7,7 +7,7 @@
|
||||||
"dev": "vite --mode development",
|
"dev": "vite --mode development",
|
||||||
"dev:test": "vite --mode test",
|
"dev:test": "vite --mode test",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"build:test": "vite build --mode test",
|
"build:dev": "vite build --mode development",
|
||||||
"build:prod": "vite build --mode production",
|
"build:prod": "vite build --mode production",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,10 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
width="500px"
|
:width="isMobile ? '90%' : '500px'"
|
||||||
:close-on-click-modal="true"
|
:close-on-click-modal="true"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
|
class="customer-background-dialog"
|
||||||
|
:fullscreen="isMobile"
|
||||||
>
|
>
|
||||||
|
<template #header>
|
||||||
|
<div class="dialog-header">
|
||||||
|
<h3 class="dialog-title">客户信息</h3>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<div class="background-info-content" v-if="currentMode">
|
<div class="background-info-content" v-if="currentMode">
|
||||||
<div v-html="formattedBackground"></div>
|
<div v-html="formattedBackground"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +27,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue'
|
import { computed, ref, onMounted, onUnmounted } from 'vue'
|
||||||
import { useChatStore } from '@/store/chat'
|
import { useChatStore } from '@/store/chat'
|
||||||
import { marked } from 'marked'
|
import { marked } from 'marked'
|
||||||
|
|
||||||
|
@ -34,6 +41,20 @@ const props = defineProps({
|
||||||
const emit = defineEmits(['update:modelValue'])
|
const emit = defineEmits(['update:modelValue'])
|
||||||
|
|
||||||
const chatStore = useChatStore()
|
const chatStore = useChatStore()
|
||||||
|
const isMobile = ref(false)
|
||||||
|
|
||||||
|
const checkMobile = () => {
|
||||||
|
isMobile.value = window.innerWidth <= 768
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
checkMobile()
|
||||||
|
window.addEventListener('resize', checkMobile)
|
||||||
|
})
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
window.removeEventListener('resize', checkMobile)
|
||||||
|
})
|
||||||
|
|
||||||
const dialogVisible = computed({
|
const dialogVisible = computed({
|
||||||
get: () => props.modelValue,
|
get: () => props.modelValue,
|
||||||
|
@ -67,44 +88,92 @@ const handleClose = () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.customer-background-dialog {
|
||||||
|
:deep(.el-dialog) {
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
margin: 0 !important;
|
||||||
|
max-width: 100% !important;
|
||||||
|
border-radius: 0;
|
||||||
|
|
||||||
|
.el-dialog__header {
|
||||||
|
margin: 0;
|
||||||
|
padding: 16px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 16px;
|
||||||
|
max-height: calc(100vh - 120px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog__footer {
|
||||||
|
padding: 12px 16px;
|
||||||
|
border-top: 1px solid #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-header {
|
||||||
|
.dialog-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.background-info-content {
|
.background-info-content {
|
||||||
padding: 0 20px;
|
padding: 0;
|
||||||
|
|
||||||
:deep(h1) {
|
:deep(h1) {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-bottom: 16px;
|
margin: 0 0 16px 0;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(h2) {
|
:deep(h2) {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin: 24px 0 16px;
|
margin: 20px 0 12px 0;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(h3) {
|
:deep(h3) {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin: 20px 0 12px;
|
margin: 16px 0 8px 0;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(p) {
|
:deep(p) {
|
||||||
margin-bottom: 12px;
|
margin: 0 0 12px 0;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(ul), :deep(ol) {
|
:deep(ul), :deep(ol) {
|
||||||
margin-bottom: 12px;
|
margin: 0 0 12px 0;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,6 +192,26 @@ const handleClose = () => {
|
||||||
.dialog-footer {
|
.dialog-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-top: 20px;
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.background-info-content {
|
||||||
|
:deep(h1) {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(h2) {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(h3) {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(p), :deep(ul), :deep(ol) {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -20,7 +20,7 @@
|
||||||
<HistoryButton v-if="settingsStore.sidebarCollapsed" :icon-only="false" class="title-history-btn" />
|
<HistoryButton v-if="settingsStore.sidebarCollapsed" :icon-only="false" class="title-history-btn" />
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<el-tooltip content="删除会话" placement="bottom">
|
<el-tooltip content="删除会话" placement="bottom" v-if="chatStore.conversationId">
|
||||||
<el-button
|
<el-button
|
||||||
class="action-btn delete-btn"
|
class="action-btn delete-btn"
|
||||||
:icon="Delete"
|
:icon="Delete"
|
||||||
|
@ -38,13 +38,12 @@
|
||||||
>
|
>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="hasBackground ? '客户背景' : '暂无客户背景信息'" placement="bottom">
|
<el-tooltip :content="hasBackground ? '客户背景' : '暂无客户背景信息'" placement="bottom" v-if="hasBackground">
|
||||||
<el-button
|
<el-button
|
||||||
class="action-btn"
|
class="action-btn"
|
||||||
:icon="User"
|
:icon="User"
|
||||||
@click="showUserInfo = true"
|
@click="showUserInfo = true"
|
||||||
text
|
text
|
||||||
:disabled="!hasBackground"
|
|
||||||
>
|
>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
Loading…
Reference in New Issue