|
@@ -97,7 +97,7 @@
|
|
|
<div class="score-label">意向分</div>
|
|
<div class="score-label">意向分</div>
|
|
|
</div> -->
|
|
</div> -->
|
|
|
<div class="customer-actions" @click.stop>
|
|
<div class="customer-actions" @click.stop>
|
|
|
- <button class="btn btn-secondary btn-sm" @click="showCustomerDetail(customer)"><i class="fas fa-eye"></i>更多详情</button>
|
|
|
|
|
|
|
+ <button class="btn btn-secondary btn-sm" @click="showCustomerDetail(customer.id)"><i class="fas fa-eye"></i>更多详情</button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -124,7 +124,7 @@
|
|
|
|
|
|
|
|
<!-- Customer Detail Modal -->
|
|
<!-- Customer Detail Modal -->
|
|
|
<div v-if="showDetailModal && selectedCustomer" class="modal-overlay" @click.self="closeDetail()">
|
|
<div v-if="showDetailModal && selectedCustomer" class="modal-overlay" @click.self="closeDetail()">
|
|
|
- <div class="modal customer-detail-modal">
|
|
|
|
|
|
|
+ <div class="modal customer-detail-modal" v-loading="detailLoading" element-loading-background="rgba(0, 0, 0, 0.5)">
|
|
|
<div class="modal-header">
|
|
<div class="modal-header">
|
|
|
<div class="modal-title">
|
|
<div class="modal-title">
|
|
|
<span class="detail-flag">{{ selectedCustomer.flag }}</span>
|
|
<span class="detail-flag">{{ selectedCustomer.flag }}</span>
|
|
@@ -267,7 +267,7 @@
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref, computed } from 'vue'
|
|
import { ref, computed } from 'vue'
|
|
|
-import { getCustomerList,getCustomerDetail,streaming } from '../api/customer'
|
|
|
|
|
|
|
+import { getCustomerList,getCustomerDetail,blocking } from '../api/customer'
|
|
|
import {region} from '@/utils/region';
|
|
import {region} from '@/utils/region';
|
|
|
// 引入添加客户组件
|
|
// 引入添加客户组件
|
|
|
import AddCustomerModal from '../components/addCustomer.vue'
|
|
import AddCustomerModal from '../components/addCustomer.vue'
|
|
@@ -285,6 +285,7 @@ const toastType = ref('success')
|
|
|
const dataLoading = ref(false)
|
|
const dataLoading = ref(false)
|
|
|
const aiContentLoading = ref(false)
|
|
const aiContentLoading = ref(false)
|
|
|
const formattedText = ref('')
|
|
const formattedText = ref('')
|
|
|
|
|
+const detailLoading = ref(false)
|
|
|
|
|
|
|
|
const customerStats = ref({
|
|
const customerStats = ref({
|
|
|
total: 0,
|
|
total: 0,
|
|
@@ -335,13 +336,20 @@ const getRegion = (value) => {
|
|
|
getCustomer()
|
|
getCustomer()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const showCustomerDetail = (customer) => {
|
|
|
|
|
- getCustomerDetail({id:customer.id}).then(res => {
|
|
|
|
|
|
|
+const customerDetailId = ref()
|
|
|
|
|
+const showCustomerDetail = (id) => {
|
|
|
|
|
+ aiContentLoading.value = false
|
|
|
|
|
+ detailLoading.value = true
|
|
|
|
|
+ showDetailModal.value = true
|
|
|
|
|
+ customerDetailId.value = id
|
|
|
|
|
+ getCustomerDetail({id:id}).then(res => {
|
|
|
if(res.success){
|
|
if(res.success){
|
|
|
|
|
+ detailLoading.value = false
|
|
|
selectedCustomer.value = res.result
|
|
selectedCustomer.value = res.result
|
|
|
- showDetailModal.value = true
|
|
|
|
|
if(selectedCustomer.value.customerAnalysisResult){
|
|
if(selectedCustomer.value.customerAnalysisResult){
|
|
|
formattedText.value = selectedCustomer.value.customerAnalysisResult.reasonSummary
|
|
formattedText.value = selectedCustomer.value.customerAnalysisResult.reasonSummary
|
|
|
|
|
+ }else{
|
|
|
|
|
+ formattedText.value = ''
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
ElMessage.warning(res.message)
|
|
ElMessage.warning(res.message)
|
|
@@ -354,17 +362,17 @@ const aiStreaming= (id) =>{
|
|
|
appId: "app-rQrSHhudWbi5LVRkIX4tfVrg",
|
|
appId: "app-rQrSHhudWbi5LVRkIX4tfVrg",
|
|
|
inputs: {"analysis_batch_no":"1","customer_id":+id},
|
|
inputs: {"analysis_batch_no":"1","customer_id":+id},
|
|
|
query: "1",
|
|
query: "1",
|
|
|
- response_mode: "streaming",
|
|
|
|
|
|
|
+ response_mode: "blocking",
|
|
|
user: "1",
|
|
user: "1",
|
|
|
files:[]
|
|
files:[]
|
|
|
}
|
|
}
|
|
|
if(aiContentLoading.value) return
|
|
if(aiContentLoading.value) return
|
|
|
aiContentLoading.value = true
|
|
aiContentLoading.value = true
|
|
|
- streaming(params).then(res => {
|
|
|
|
|
|
|
+ ElMessage.warning('AI分析时间大概为2-4分钟,请稍后查看')
|
|
|
|
|
+ blocking(params).then(res => {
|
|
|
aiContentLoading.value = false
|
|
aiContentLoading.value = false
|
|
|
- ElMessage.warning('AI分析时间大概为2-4分钟,请稍后查看')
|
|
|
|
|
if(res.success){
|
|
if(res.success){
|
|
|
- aiContentLoading.value = true
|
|
|
|
|
|
|
+ showCustomerDetail(customerDetailId.value)
|
|
|
}
|
|
}
|
|
|
// else{
|
|
// else{
|
|
|
// return ElMessage.error('请求超时,请稍后再试')
|
|
// return ElMessage.error('请求超时,请稍后再试')
|
|
@@ -373,7 +381,6 @@ const aiStreaming= (id) =>{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const goOtherProject = (data) => {
|
|
const goOtherProject = (data) => {
|
|
|
- console.log(data)
|
|
|
|
|
const baseUrl = 'https://sales.test.storlead.com/customer/followPanel' // 销售管理系统
|
|
const baseUrl = 'https://sales.test.storlead.com/customer/followPanel' // 销售管理系统
|
|
|
const params = {
|
|
const params = {
|
|
|
id: data.id,
|
|
id: data.id,
|
|
@@ -392,7 +399,7 @@ const goOtherProject = (data) => {
|
|
|
}
|
|
}
|
|
|
const closeDetail = ()=>{
|
|
const closeDetail = ()=>{
|
|
|
showDetailModal.value = false
|
|
showDetailModal.value = false
|
|
|
- aiContentLoading.value=false
|
|
|
|
|
|
|
+ aiContentLoading.value = false
|
|
|
}
|
|
}
|
|
|
// const customers = ref([
|
|
// const customers = ref([
|
|
|
// {
|
|
// {
|