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:
TradeMate Dev
2026-05-27 16:22:07 +08:00
parent c1638db6b2
commit bc48c220a0
7 changed files with 96 additions and 14 deletions
+9 -1
View File
@@ -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 }
}