Add user-friendly loading feedback for all AI/long-running operations
- Discovery: show '搜索中约需30-60秒' message, auto-save to history, timeout hint - Discovery extract/outreach: show '正在分析网站/生成文案' loading message - Translate: inline '翻译中...' placeholder while waiting - Marketing: inline 'AI 生成中...' placeholder, success feedback - Quotations AI: inline progress text + ElMessage.info during generation - Analytics: add v-loading skeleton with '加载数据分析中...' - Notifications: add v-loading skeleton with '加载通知中...' - Followup: wire up '扫描跟进提醒' button with AI progress indicator
This commit is contained in:
@@ -138,10 +138,18 @@ async function markSent(row) {
|
||||
async function generateFromInquiry() {
|
||||
if (!inquiryText.value.trim()) return
|
||||
genLoading.value = true
|
||||
genResult.value = 'AI 正在分析询盘并生成报价,请稍候...'
|
||||
const msg = ElMessage.info('正在生成报价...', { duration: 0 })
|
||||
try {
|
||||
const res = await generateQuoteFromInquiry({ text: inquiryText.value })
|
||||
msg.close()
|
||||
genResult.value = res.data?.quotation || res.quotation || JSON.stringify(res.data || res, null, 2)
|
||||
} catch { ElMessage.error('生成失败') }
|
||||
ElMessage.success('报价已生成')
|
||||
} catch {
|
||||
msg.close()
|
||||
genResult.value = ''
|
||||
ElMessage.error('生成失败')
|
||||
}
|
||||
finally { genLoading.value = false }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user